how to improve simple python shell script (to compile list of files)

Robert Kern robert.kern at gmail.com
Sat Oct 15 14:48:27 EDT 2005


Jari Aalto wrote:

> Thanks, is there equivalent to this Perl statement in Python?
> 
>    @list = @ARGV[1 .. @ARGV];
> 
> or something similar so that I could avoid the 1 > 1 (sys.argv) check
> altogether?

for arg in sys.argv[1:]:
    ...

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter




More information about the Python-list mailing list