turn text lines into a list

Xah Lee xah at xahlee.org
Mon Jun 27 12:33:29 CEST 2005


i have a large number of lines i want to turn into a list.
In perl, i can do

@corenames=qw(
rb_basic_islamic
sq1_pentagonTile
sq_arc501Tile
sq_arc503Tile
);

use Data::Dumper;
print Dumper(\@corenames);

----------
is there some shortcut to turn lines into list in Python?

 Xah
 xah at xahlee.orghttp://xahlee.org/




More information about the Python-list mailing list