Feb-13-2022, 08:15 PM
One way:
#! /usr/bin/env python3 acceptable = ['r', 'p', 's', 'q'] while True: print(f'Allowed input - {", ".join(acceptable)}') choose = input('>> ').lower() if choose == 'q': break if choose in acceptable: print(f'{choose} is allowed.') else: print(f'{choose} is not allowed')
I welcome all feedback.
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts
The only dumb question, is one that doesn't get asked.
My Github
How to post code using bbtags
Download my project scripts