More random python observations from a perl programmer
Skip Montanaro
skip at mojam.com
Thu Aug 19 14:44:49 EDT 1999
Tom> BTW, the @colors assignment is more legibly written using the qw//
Tom> syntactic sugar:
Tom> @colors = qw(red blue green yellow orange purple);
In Python an occasional idiom you see is to use string.split to save typing
so many quotes:
colors = string.split("red blue green yellow orange purple")
Skip Montanaro | http://www.mojam.com/
skip at mojam.com | http://www.musi-cal.com/~skip/
847-971-7098
More information about the Python-list
mailing list