立即学习:https://edu.csdn.net/course/play/10003/212824?utm_source=blogtoedu
字符串操作
str ="hellow world"
str[0:4] 相当于java中的subString(0,4)
str[1:]获取索引为1到结束
str[:4]从开始获取到索引4
str[::1]搁一位截取以为
以上方法都会返回新的字符串
查看字符串长度len(str)
数值类型的字符串可以和int float互转,字母汉字会报错