how to write python code for this question.I want to iterate loop for multiple values but it will print only one place. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

how to write python code for this question.I want to iterate loop for multiple values but it will print only one place.

example: for e in range(0,5): print(e) For this I want to print 5 numbers like First it will print 0 and I want to vanish 0 and it will override by 1 and next iterating 1 could be vanish and it will override by 2 up to the value 4. Only I want to print only one value after iterating complete for e in range(0,5): print(e) Output:4 Again I am telling only I want to print one value after completion of iteration

5th May 2021, 8:22 AM
A J
A J - avatar
2 Answers
0
Madam I don't want to print only one value I want to print all numbers but in only one place. Note: I don't want to see previous iterating value in output screen. ********************* for the in range(0,5): print(the) it will print like 0 1 2 3 4 5 But firstly I want to print 0 into he output screen and next iteration I want to print 1 and this value is ovveriden in 0's place in output screen and next iterating I want to print 2 and this value is ovveriden 1's place and so on. I don't want to print only number 4, I want to print all numbers but it will overriden before iteration number place in output screen
5th May 2021, 9:01 AM
A J
A J - avatar
0
Madam if can i write code like this: it will get correct answer or not. for e in range(0,5): print(e) os.system('cls')
5th May 2021, 9:22 AM
A J
A J - avatar