❓ Quiz Python

Comprendre le scope des variables en Python.

PYTHONIntermediairescope
20
quiz.py
1
x = 10
2
 
3
def fonction():
4
    x = 20
5
    return x
6
 
7
fonction()
8
print(x)