Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Functions
#2
def check_input():
    while True:
        id = input("Please enter your ID: ")
        if len(id) == 8:
            print("Thanks for the input ", id)
            return id
        else:
            print(id, " does not contain 8 alphanumeric characters, please enter your ID again")

id = check_input()
Reply


Messages In This Thread
Functions - by metro17 - Aug-20-2019, 09:07 AM
RE: Functions - by ThomasL - Aug-20-2019, 11:59 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020