[python]Substring

We can store strings in variable as a list of characters
var = "this is a string"

we can refer part of the string by

print(var[0:5])

 

posted @ 2016-06-05 12:19  Symmetry  阅读(749)  评论(0)    收藏  举报