problems when unpacking tuple ...

Felipe Almeida Lessa felipe.lessa at gmail.com
Sat Apr 22 13:24:58 EDT 2006


Em Sáb, 2006-04-22 às 09:21 -0700, harold escreveu:
> for line in sys.stdin :
>     try :
>         for a,b,c,d in line.split() :
>             pass
> 
>     except ValueError , err :
>         print line.split()
>         raise err 

Try this:

for a, b, c, d in sys.stdin:
     print a, b, c, d

-- 
Felipe.




More information about the Python-list mailing list