- 博客(2)
- 收藏
- 关注
原创 PYTHON从入门到实践-第四章
操作列表 4.1遍历整个表 dreamtour=['japan','rio','canada','america','melbourne'] for dream in dreamtour: print(dream) 4.1.1 深入研究循环 for循环会使列表中的每个值都执行一次缩进行代码部分,缩进行的代码可包含无数行代码; 4.1.2在for循环中执行更多的操作 再缩进一行,写代码即可 names=['lily','harry','snape'] for actor in names:
2020-07-10 16:01:04 197
原创 PYTHON从入门到实践-第三章
PYTHON从入门到实践-第三章 3.1 列表 family = ['casper','zoe'] print(family[0].title()) # 其实中括号[]就是代表‘列表’ print(family[-1].title()) # 动手试一试 3-2 family=['casper','zoe'] print('hey,'+family[0]+'\nit has been two years since we met at the first time\n'+family[-1]) 敲黑板,用p
2020-07-09 11:07:15 246
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人