Latest web development tutorials

Python 練習實例74

Python 100例 Python 100例

題目:連接兩個鍊錶。

程序分析:無。

程序源代碼:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

if __name__ == '__main__':
    arr1 = (3,12,8,9,11)
    ptr = list(arr1)
    print ptr
    ptr.sort()
    print ptr
[3, 12, 8, 9, 11]
[3, 8, 9, 11, 12]

Python 100例 Python 100例