I'm trying to do a (a think) rather simple task with Python but cannot seem to do it or find a way to do it. I'm trying to have a for loop where my variables are set to another variable with a custom number. It's a bit hard to explain, but my code will explain it better :
aha_aha1 = "1"
aha_aha2 = "wouh"
aha_aha3 = "yes !"
test = "my man !"
for i in range (0, 4):
if aha_aha{i} = "yes !":
test[i] == aha_aha{i}.format(i)
I want test[i]
to be aha_aha[i]
only when certain conditions are met, but my code above obviously doesn't work. Any help ?