中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

Python 練習實例73

Python 100例 Python 100例

題目:反向輸出一個鏈表。

程序分析:無。

實例(Python 2.0+)

#!/usr/bin/python # -*- coding: UTF-8 -*- if __name__ == '__main__': ptr = [] for i in range(5): num = int(raw_input('please input a number:n')) ptr.append(num) print ptr ptr.reverse() print ptr

以上實例輸出結(jié)果為:

please input a number:
6
please input a number:
5
please input a number:
3
please input a number:
4
please input a number:
8
[6, 5, 3, 4, 8]
[8, 4, 3, 5, 6]

Python 100例 Python 100例

其他擴展