Python自学:第三章 使用列表中的各个值

bicycles = ['trek','cannondale','redline','specialized']
message = "My first bicycle was a " + bicycles[0].title() + "."

print(message)

输出为:

My first bicycle was a Trek.

 

posted @ 2019-04-17 09:10  Johnson蚂蚁  阅读(247)  评论(0编辑  收藏  举报