python練習-for in str

for coolguy in ("tom","jerry","alex"):
    print coolguy ,"is coolest guy ever!"
 
result

C:\Python27\python.exe C:/Users/hunk.hu.BWH/PycharmProjects/untitled/coolguy.py
tom is coolest guy ever!
jerry is coolest guy ever!
alex is coolest guy ever!


Process finished with exit code 0

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章