Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Accessing String Elements | Basic Concepts
String Manipulation in Python
course content

Зміст курсу

String Manipulation in Python

String Manipulation in Python

1. Basic Concepts
2. String Methods
3. Strings Formatting

Accessing String Elements

Now we know how we can create a string: both single and multiline. Now we need to learn how can we access certain elements in the string.

Elements in a string can be accessed by using indices. The very first index is 0, not 1. Therefore, if a string has 10 elements, the very last index will be 9.

Завдання

Given variable course with the string String Manipulation in Python. Your tasks are:

  1. Extract the element with index 7.
  2. Extract the 12th element.

Завдання

Given variable course with the string String Manipulation in Python. Your tasks are:

  1. Extract the element with index 7.
  2. Extract the 12th element.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 1. Розділ 3
toggle bottom row

Accessing String Elements

Now we know how we can create a string: both single and multiline. Now we need to learn how can we access certain elements in the string.

Elements in a string can be accessed by using indices. The very first index is 0, not 1. Therefore, if a string has 10 elements, the very last index will be 9.

Завдання

Given variable course with the string String Manipulation in Python. Your tasks are:

  1. Extract the element with index 7.
  2. Extract the 12th element.

Завдання

Given variable course with the string String Manipulation in Python. Your tasks are:

  1. Extract the element with index 7.
  2. Extract the 12th element.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Секція 1. Розділ 3
toggle bottom row

Accessing String Elements

Now we know how we can create a string: both single and multiline. Now we need to learn how can we access certain elements in the string.

Elements in a string can be accessed by using indices. The very first index is 0, not 1. Therefore, if a string has 10 elements, the very last index will be 9.

Завдання

Given variable course with the string String Manipulation in Python. Your tasks are:

  1. Extract the element with index 7.
  2. Extract the 12th element.

Завдання

Given variable course with the string String Manipulation in Python. Your tasks are:

  1. Extract the element with index 7.
  2. Extract the 12th element.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів

Все було зрозуміло?

Now we know how we can create a string: both single and multiline. Now we need to learn how can we access certain elements in the string.

Elements in a string can be accessed by using indices. The very first index is 0, not 1. Therefore, if a string has 10 elements, the very last index will be 9.

Завдання

Given variable course with the string String Manipulation in Python. Your tasks are:

  1. Extract the element with index 7.
  2. Extract the 12th element.

Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Секція 1. Розділ 3
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt