python - Rewrite this loop function with range -
is possible rewrite loop:
for k,n in [[aa,1],[ab,2], [ac,3], [ad,4], [ba,5], [bb,6], [bc,7], [bd,8], [ca,9],[cb,10],[cc,12],[cd,13],[da,14],[db,15],[dc,16],[dd,17],...zd,220]]:
with 2 range functions or "list multiplication"? have tried sorts of approaches, none worked far.
thank you.
if have objects in list quite simple:
object_list = [aa, ab, ... ] n, k in enumerate( object_list, start=1): ...
so should way put them in list instead.
Comments
Post a Comment