Consider the following code:
def pp():
    print(f'{aa=}')
if __name__ =='__main__':
    aa = 11
    pp()
This prints aa=11. This means pp is getting the value of aa from outside pp. Is there a way to prevent this from happening?
Consider the following code:
def pp():
    print(f'{aa=}')
if __name__ =='__main__':
    aa = 11
    pp()
This prints aa=11. This means pp is getting the value of aa from outside pp. Is there a way to prevent this from happening?
 
    
    