another newbie question: why should you use "*args" ?

Jeffrey Froman jeffrey at fro.man
Wed Jan 31 10:56:56 EST 2007


stef wrote:

>> And one note more. Just to be more pythonic you shouldn't use form
>> range(len(blabla)). Instead use:
>>
>> for i in list:
>> ....blabla...
>>
>>
> I would love that,
> but please tell me how (I need an integer counter for something else too):

for index, item in enumerate(args):
    ...


Jeffrey



More information about the Python-list mailing list