python: running a loop over indexes of a sub list -
for items in things: while inputfloat != 0: thingsback[][1]=inputfloat//things[] inputfloat=inputfloat-(things[]*thingsback[][1])
things list of n elements, while thingsback list n sub-lists. want both things , thingsback start @ 0th element , loop through recursion. calculation inputfloat//things[] changes 1 index of j-th sublist in thingsback. know [] invalid syntax, used illustrative purposes.
it seems there obvious solution, not seeing it.
taking guess, think looking index of current item in loop?
for index, items in enumerate(things): # stuff using index
check out:
Comments
Post a Comment