I have a program that calls a function, and the function returns an integer within a range of 1-25. I have a corresponding 25 lists in my program that, based on the value of this returned integer, I then need to pass to another function.
For example:
List1 = [1, 45]
...
List25 = [4, 584]
def ReturnListRef():
a = 24
return a
What would be the quickest way to use the returned value of '24' to send List24 to my next function?
Seems like it should be so easy to do, but after finishing up my beginners guide to Python book, I still can't achieve this without what seems like too many steps!
items = [[1, 45], [...], ..., [4, 584]]. With that you simplyreturn items[a]items = [[1, 45], [...], ..., [4, 584]]then you can returnitems[24]