Posts by Gabriel • 9 points
1 post
-
0
votes2
answers67
viewsQ: Shorten condition that checks if value is one of several possible
Is there any way to shorten the if a == 1 or a == 2 or a == 3 of the code below? a = int(input('Digite um número: ')) if a == 1 or a == 2 or a == 3: print('O Número digitado está entre 1 a 3') else:…