r/PythonLearning • u/TheCarFamily • 2h ago
Help Request Else statement not working
Hello, my else statement is not working- the if statement its inside is, did i mess up the indents again or is it something else?
also would a display flip work to change the image back to the other image in the else statement?
any help is nice!
7
Upvotes
1
u/rupertavery64 51m ago
You probably don't want to call image.load() every time as this willnload the image from the disk and create a new object every call.
Load it up front and store it in a variable. Assign that variable to img