I am a student studying Python.
My code for is
Yes. If you write the code and print it out, you can print it out one by one.
Is there a way to print it out at once like the example?python
If you look at the while statement, it's processing it right away and printing it out.
You can separate the input/output and rotate the loop twice.
So, we can only take the input part forward and save the input, and change the rest of the action to work in the for loop after the input is done.
I think I could have done it myself. Think about this a little more and solve it. That's the fun of programming.
© 2022 pinfo. All rights reserved.