Equivalent 2->> print '%d %d' %(l[i], for i in range(2))?
Jorn Verwey
jorn.verwey at psi.ch
Thu May 17 10:52:29 EDT 2001
More information about the Python-list mailing list
Thu May 17 10:52:29 EDT 2001
- Previous message (by thread): Equivalent 2->> print '%d %d' %(l[i], for i in range(2))?
- Next message (by thread): Equivalent 2->> print '%d %d' %(l[i], for i in range(2))?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
How can I avoid typing %(l[0],l[1]) in the following case? ->> l=[4,14] ->> print '%d %d' %(l[0],l[1]) would like something more in the line of: ->> print '%d %d' %(l[i], for i in range(2)) for longer lists. Thank you, Jorn -- Jorn Verwey PSI - Life Sciences WMSA/B14 CH 5232 Villigen PSI Switzerland tel. +41 56 310 4246 fax. +41 56 310 3132 -o) jorn.verwey at psi.ch /\\ jorn.verwey at bigfoot.com _\_v
- Previous message (by thread): Equivalent 2->> print '%d %d' %(l[i], for i in range(2))?
- Next message (by thread): Equivalent 2->> print '%d %d' %(l[i], for i in range(2))?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list