>>> import copy
>>> a = [1,2,3,4,['a','v']]
>>> b = a
>>> b
[1, 2, 3, 4, ['a', 'v']]
>>> c = copy.copy(a)
>>> c
[1, 2, 3, 4, ['a', 'v']]
>>> d = copy.deepcopy(a)
>>> d
[1, 2, 3, 4, ['a', 'v']]
>>> a.append(5)
>>> a
[1, 2, 3, 4, ['a', 'v'], 5]
>>> b
[1, 2, 3, 4, ['a', 'v'], 5]
>>> c
[1, 2, 3, 4, ['a', 'v']]
>>> d
[1, 2, 3, 4, ['a', 'v']]
>>> a[4].append('c')
>>> a
[1, 2, 3, 4, ['a', 'v', 'c'], 5]
>>> b
[1, 2, 3, 4, ['a', 'v', 'c'], 5]
>>> c
[1, 2, 3, 4, ['a', 'v', 'c']]
>>> d
[1, 2, 3, 4, ['a', 'v']]
>>>
×î½üÒªÓõ½´®¿ÚͨѶ£¬¼òµ¥Ò×ÓõÄPythonÓÖ°ïÉÏæÁË£¬¶à¿÷ÁËÅÓ´óµÄµÚÈý·½×ÊÔ´~~~ £º£©
pySerial
Overview
This module encapsulates the access for the serial port. It provides
backends for Python running on Windows, Linux, BSD (possibly any POSIX
compliant system), Jython and IronPython (.NET and M ......