How to get char from string by index?

后端 未结 7 1041
青春惊慌失措
青春惊慌失措 2020-11-29 04:25

Lets say I have a string that consists of x unknown chars. How could I get char nr. 13 or char nr. x-14?

7条回答
  •  长情又很酷
    2020-11-29 04:40

    Python.org has an excellent section on strings here. Scroll down to where it says "slice notation".

提交回复
热议问题