Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i = 0
- for j in range(5):
- i += 1
- w[i] = function(i)
- #results in:
- w1 = function(1)
- w2 = function(2)
- #etc...
- d={} #empty dictionary
- for x in range(1,10): #for looping
- d["string{0}".format(x)]="Variable1"
- W = []
- for j in range(5):
- ...
- W.append(function(i))
- i = 0
- for j in range(5):
- i += 1
- globals()["w" + str(i)] = function(i)
- print (w1)
- my_variables = {}
- i = 0
- for j in range(5):
- i += 1
- my_variables["w" + str(i)] = function(i)
- print (my_variables["w1"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement