创建一维数组
1 | def creat1D(value,n): |
一维数组初始化
First
1 | s=[] |
Second
1 | s=[0]*10 |
Third
1 | s=list(range(5)) |
Forth
1 | s=[ 0 for i in range(5)] |
Fifth
1 | s=[0,0,0,0,0] |
数组的复制
1 | s=[1,3,3] |
正确的数组复制
First
1 | s=[1,3,3] |
Second
1 | s=[1,3,3] |
1 | def creat1D(value,n): |
1 | s=[] |
1 | s=[0]*10 |
1 | s=list(range(5)) |
1 | s=[ 0 for i in range(5)] |
1 | s=[0,0,0,0,0] |
1 | s=[1,3,3] |
1 | s=[1,3,3] |
1 | s=[1,3,3] |