# -*- coding: utf-8 -*- names = ['苹果', '香蕉', '梨子'] for name in names: print ("hello, "+ name)
说白一点就是 把names的值,赋值给name 跟javascript跟for in 遍历感觉差不多
# -*- coding: utf-8 -*- names = ['苹果', '香蕉', '梨子'] for name in names: print ("hello, "+ name)
说白一点就是 把names的值,赋值给name 跟javascript跟for in 遍历感觉差不多