I would like to add strings to my code in runtime depending on user input.
something like:
import random
set = (1,2,3,4)
x = 1
def newstring():
etc = random.choice(set)
(no,x) = etc
x = x + 1
nextstring = input("Next string?")
nextstring = input("Next string?")
while nextstring == "y":
newstring()
print(no + x)
I would like to make (n,x) a variable.
So every time the user asked for a new string it would set a new variable like no1 = 4 where 1 is 1 because x is 1 and 4 is 4 because it's a random pick. The new variable then would be no2 with a totally different value