当前位置:首页 > Python教程 > python技巧

[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])

 

原文:http://www.cnblogs.com/lmliu/p/5560445.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐