?
python : 3.7.0
OS : Ubuntu 18.04.1 LTS
IDE : PyCharm 2018.2.4
conda : 4.5.11
type setting : Markdown
?
code
coder@Ubuntu:~$ source activate py37
(py37) coder@Ubuntu:~$ ipython
Python 3.7.0 (default, Jun 28 2018, 13:15:42)
Type ‘copyright‘, ‘credits‘ or ‘license‘ for more information
IPython 6.5.0 -- An enhanced Interactive Python. Type ‘?‘ for help.
In [1]: empty_list = []
In [2]: len(empty_list)
Out[2]: 0
In [3]: empty_list.append(1)
In [4]: len(empty_list)
Out[4]: 1
In [5]: empty_list.append([1, 2]) # 列表中的列表算 单个元素
In [6]: empty_list
Out[6]: [1, [1, 2]]
In [7]: len(empty_list)
Out[7]: 2
In [8]: exit
(py37) coder@Ubuntu:~$ source deactivate py37
coder@Ubuntu:~$
?
resource
[