Clayton Kirkwood wrote: > description_string=code_string='' > > description = code = 'a' > > for (description_position, code_position) in (description, code): > > print(description_position,code_position)
> I have tried variations on this for statement, and it doesn't work:<))) > Both description and code have the same size array. I was hoping that some > derivative of this for would bring in a new description_position value, > and code_position value. You want zip(): >>> colors = [ "red", "green", "yellow"] >>> fruit_list = ["cherry", "apple", "banana"] >>> for color, fruit in zip(colors, fruit_list): ... print(color, fruit) ... red cherry green apple yellow banana _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor
