Posts by pedro • 17 points
1 post
-
0
votes1
answer67
viewsQ: Global variable does not change the value
I’m a beginner and I don’t know why this code doesn’t work. Can someone tell me why? def teste(): global res1 res1 = input().strip() if res1 == '1': print('funciona')…