sh_14_字符串定义和遍历
sh_14_字符串定义和遍历
str1 = "hello python" str2 = '我的外号是"大西瓜"' print(str2) print(str1[6]) for char in str2: print(char)
![](https://images.cnblogs.com/cnblogs_com/shaohan/1120164/o_o_Warning.png)
sh_14_字符串定义和遍历
str1 = "hello python" str2 = '我的外号是"大西瓜"' print(str2) print(str1[6]) for char in str2: print(char)