python - 基础算法题7 - 使用while和for循环分别打印字符串s=’asdfer’中每个元素。
s = 'fkld' for i in s: print(i) index = 0 while 1: print(s[index]) index += 1 if index == len(s): break
s = 'fkld' for i in s: print(i) index = 0 while 1: print(s[index]) index += 1 if index == len(s): break