Python自学:第四章 在for循环中执行更多操作(1)
# -*- coding: GBK -*- magicians = ['alice', 'david', 'carolina'] for magician in magicians: print(magician.title() + ", that was a great trick!")
输出为:
Alice, that was a great trick! David, that was a great trick! Carolina, that was a great trick!
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

更多精彩