Is there any way that I can automatically create new variables based on how many items I have in a Python list?
For instance, if I have a variable like this:
var = (json.loads(requests.get(list[0])).text)
Is it possible to automatically create additional variables like this, depending on the length of my list? I'd like to avoid manually writing out all my variables. Let's say my list has 4 items (length = 4).
var = (json.loads(requests.get(list[0])).text)
var1 = (json.loads(requests.get(list[1])).text)
var2 = (json.loads(requests.get(list[2])).text)
var3 = (json.loads(requests.get(list[3])).text)
I would appreciate any help. Thank you.