0
How do I print last output of a loop?
I have a python code that uses loop for, but when I print the result, it prints every stage. Is it possible to print only the last result?
3 odpowiedzi
+ 5
store the result to a variable everytime loop runs and a new result is calculated and print that variable outside loop
+ 3
Soul , it would be a good idea to share your code with us. This saves us a lot of time and we don't have to guess. Thanks!
+ 1
It works Abhay, tysm