Hey,fellow coders!:D
I need some help with how to loop the following script until the right input is given:>>>
className=input("Are you enetring results for class a, class b or class c:>>>")

This may work

while True:
    className=input("Are you enetring results for class a, class b or class c:>>>").strip().lower()
    if className in ('a', 'b', 'c'):
        break
    else:
        print('Invalid name, please enter a, b or c')
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.