#!/usr/bin/python
b = [1]*10
#print b
for i in range(0,10):
print b[i],
for i in range(0,10):
print b[i]
a = [[1000]*10]*10
#print a
for i in range(0,10):
for j in range(0,10):
print a[i][j],
如果要定义bytearray 可以这样:
s = 'anythingenoughlong'
getbarray = bytearray(s.encode(encoding='utf-8'))
得到一个长度为len=len(s)的bytearray