This is my first S.O. post!
I'm trying to learn Python with Murach's Python Programming- an excellent resource by the way...
Regarding the following code:
is_valid = True
customer_type = input('Enter customer type (r/w): ')
if customer_type == 'r' or customer_type == 'w':
print(f'You entered: {customer_type}')
# pass
else:
print('Customer type must be "r" or "w".')
is_valid = False
I don't understand why the is valid True & False variables are required because the code appears to work fine when I comment them both out?
Thanks in advance!!