+ 2
How can I output only the last result of my loop
For example a loop outputing: 1 2 3 How will I output only the "3"
7 odpowiedzi
+ 3
https://code.sololearn.com/cxbgDz9ZHqbx/?ref=app
I hope this helps...
+ 2
Awojobi Godfrey Just print the "stop" part of the loop
+ 2
Just answer how will you run a loop without any termination ?
+ 1
How will I print the stop part
+ 1
Pls am a beginner, I dont still get u, explain with codes
+ 1
Thanks understood
0
The way you do is by adding a condition after a loop
Code:
for i in range(1:4):
if i == 3:
print(i)
The condition works if the value of i equals 3.
Hope it helps
Happy coding