小碎知识

1. 代码:

data=['a' for i in range(5)]
print(data)

 运行结果:

C:\abccdxddd\Oldboy\python-3.5.2-embed-amd64\python.exe C:/abccdxddd/Oldboy/Py_Exercise/Day10/ex7.py
['a', 'a', 'a', 'a', 'a']

Process finished with exit code 0

 

posted on 2017-08-18 15:01  momo8238  阅读(161)  评论(0编辑  收藏  举报