for循环 - 遍历字符串 str = "HP" for c in str: print(c) 测试 H P for else for c in str: print(c) else: print('end') 测试 H P end