One-step multiples list generation?
Damien Wyart
damien.wyart at free.fr
Tue Jan 3 12:57:31 EST 2006
More information about the Python-list mailing list
Tue Jan 3 12:57:31 EST 2006
- Previous message (by thread): One-step multiples list generation?
- Next message (by thread): One-step multiples list generation?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
* Efrat Regev <efrat_regev at yahoo.com> in comp.lang.python: > Suppose I have some non-numerical Foo and would like to create a list > of 20 Foo-s. Is there a one-step method (not a loop) of doing so? Maybe : [ Foo ] * 20 or, more verbose, [ Foo for _ in range(20) ] ? -- DW
- Previous message (by thread): One-step multiples list generation?
- Next message (by thread): One-step multiples list generation?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list