Simple passcode checker
OK, this is racking my brain. Ive stripped this code back down to the bare bones for this question. How do i get the code to only print "Valid Code" only once, meaning after it has checked all numbers? Example, if i type 12345, i dont want it to say "Valid Code" 5 times, only once. I did put a break in the "Invalid" part, because as soon as it sees 67890, there is no need to continue checking the rest of the numbers. Keep in mind, i fully understand why i get this output with the current "print" statements i have show. I have tried to put it at the end, but if i did an "Invalid" entry, it would still print "valid" after the code ran. This is nothing real, and only for my own learning. Thanks https://code.sololearn.com/cpo3349NtS4w/?ref=app