0
What if I code something like : list(range(1,26,0))? Will it make a list with 26 1's?
I want to make a list with same numbers without using a loop.
2 Respostas
+ 4
List with 26 1's:
[1]*26
http://b.wardje.eu/2012/09/initialise-JUMP_LINK__&&__python__&&__JUMP_LINK-list-to-length-with.html
+ 2
you can't set the step argument to be 0. so just do:
[n]*m