4-2
复制代码
1
2
3
4
5
6animals=['dog','cat','cow'] for animal in animals: print(animal) print('A '+animal.title()+' would make a great pet.n') print('Any of these animals would make a great pet!n')
4-5
复制代码
1
2
3
4
5
6
7array=[] for value in range(1,1000001): array.append(value) print(min(array)) print(max(array)) print(sum(array))
4-10
复制代码
1
2
3
4
5
6
7
8array=['a','b','c','d','e'] print('The first three elements:') print(array[0:3]) print('Three elements from middle of the list:') print(array[1:4]) print('The last three elements of list:') print(array[-3:])

最后
以上就是儒雅雨最近收集整理的关于第三次作业的全部内容,更多相关第三次作业内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复