答案是:可以的,而且有4种方法
1、第一种方式,for in
girl_str = "love You"
for everyChar in girl_str:
print everyChar
2、第二种方式,range()或xrange(),把字符串长度传进去就行
girl_str = "love You"
for index in range(len(girl_str)):
print girl_str[index]
3、第三种方式,enumerate()
girl_str = "love You"
for index, everyChar in enumerate(girl_str):
print str(index) + everyChar
4、第四种方式,iter()
girl_str = "love You"
for everyChar in iter(girl_str):
print everyChar