for i in range(0,6):
plt.figure(figsize=(5,5))
for j in range(0,4):
plt.plot([1,2,3,4,i,j])
plt.title('sample plot')
x = input('Enter sample id: ')
if x == 's':
print('s typed')
print(' ')
else:
print('s not typed')
print(' ')
for the example code above, I want to produce the plot and then have input which is processed by the following if statement, then the second for loop starts and do the same. For example, the code will loop 6 times I want to plot the first graph and have the first input and then have the second graph and the second input and so on, but what happens is when i run the code it asks me for input first and until I input 6 times it wont produce any plot. it produces all 6 plots after I give all inputs. You will understand what I mean once you run the code.
Do you know how to fix it in a way that I want? and why that happened?
Thank you for your help:)