[Tutor] Equivalent to perl -e

Glenn T Norton gtnorton at earthlink.net
Mon Oct 16 03:32:47 CEST 2006

Chris Lasher wrote:

>My professor and advisor has been "inspired" by me to give Python a
>try. He's an avid Perl user, and challenged me with the following:
>What is the Python equivalent to perl -e '<some oneliner>'?
>Embarassingly, I had no answer, but I figure, someone on the list will
>know. His use of Python is at stake; he threatened that, since he's
>dependant enough on using perl -e within Emacs enough, if it can't be
>done in Python, he won't take the language seriously. Help me, Python
>Tutor, you're his only hope!
>Thanks in advance,
>Tutor maillist  -  Tutor at python.org
How about...
python -c "for x in 'Tell them to jump on board and take the blue pill': 
print x"


"Ketchup. For the good times... " - Ketchup Advisory Board 
Glenn Norton
Application Developer
glenn at nebraska.gov

More information about the Tutor mailing list