Follow me
-
Recent Posts
calendar
Recent Comments
- Stan on python argparse issues with the help argument (TypeError: %o format: a number is required, not dict)
- Cormac on Pandas : how to compare dataframe with None
- LP on AWK: the substr command to select a substring
- jrab on python argparse issues with the help argument (TypeError: %o format: a number is required, not dict)
- How to disable SSL verification for urlretrieve? – Peter's blog on python: certificate verified failed
Archives
Categories
Meta
Daily Archives: July 29, 2013
Python: list of empty lists creates references not copy
In Python, you can create a list with an element repeated N times quite easily with the following syntax: >>> a = [1] * 5 >>> print(a) [1,1,1,1,1] >>> a = [1] * 5 >>> print(a) [1,1,1,1,1] Here we create … Continue reading