📌  相关文章
📜  如何在数字python代码示例中获取字符串中的特定字符

📅  最后修改于: 2022-03-11 14:47:11.494000             🧑  作者: Mango

代码示例3
# An example text
text = "This is text"
# print the [0] first character of the sample text, 
#            [4] fifth character,
#            [0: 4] first to fifth character,
#            [-1] last character.
print(tekst[0], tekst[4], tekst[0:4], tekst[-1])