Python遍历字符串中的每一个字符直接用for 语句#遍历字符串a = 'asd'for q in a: print(q)# 输出结果为asd ……继续阅读 » 水墨上仙 5年前 (2020-11-16) 1658浏览 450个赞
python遍历字符串中的字符word = raw_input("Enter a word: ")print "\nHere's each letter in your word:"for letter in word: print letter……继续阅读 » 水墨上仙 7年前 (2019-08-08) 3092浏览 2520个赞