В Python индексация начинается с 0, Да, Нет, Последний символ в строке имеет индекс равный длине строки, Да, Нет, Индекс -1 всегда указывает на последний символ, Да, Нет, Индекс -2 указывает на первый символ, Да, Нет, word[0] и word[-len(word)] дают один и тот же символ, Да, Нет, Пробелы учитываются в длине строки, Да, Нет, Пустая строка "" имеет длину 1, Да, Нет, Можно изменить символ в строке: word[0] = "A", Да, Нет, Для строки "Hello" индекс последнего символа — 4, Да, Нет, len("abc") вернёт 3, Да, Нет.
0%
Python Strings 0
Share
Share
Share
by
Arrakturv
Edit Content
Print
Embed
More
Assignments
Leaderboard
Show more
Show less
This leaderboard is currently private. Click
Share
to make it public.
This leaderboard has been disabled by the resource owner.
This leaderboard is disabled as your options are different to the resource owner.
Revert Options
Quiz
is an open-ended template. It does not generate scores for a leaderboard.
Log in required
Visual style
Fonts
Subscription required
Options
Switch template
Show all
More formats will appear as you play the activity.
)
Open results
Copy link
QR code
Delete
Continue editing:
?