Multi-line commands with 'python -c'
Terry Reedy
tjreedy at udel.edu
Fri May 30 11:29:44 EDT 2014
More information about the Python-list mailing list
Fri May 30 11:29:44 EDT 2014
- Previous message (by thread): Multi-line commands with 'python -c'
- Next message (by thread): Multi-line commands with 'python -c'
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 5/30/2014 2:45 AM, Rustom Mody wrote:
> $ python -c 'import os, pprint; pprint.pprint ([ r for r, d, f in os.walk(".") if len(d+f) != 1])'
>
> Mysterious that print after a ; is fine whereas for is not
Not at all. Simple statememts can follow ; or :, compound statements cannot.
--
Terry Jan Reedy
- Previous message (by thread): Multi-line commands with 'python -c'
- Next message (by thread): Multi-line commands with 'python -c'
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list