cannot access local variable 'l' where it is not associated with a value

technical talkiess
0

 Traceback (most recent call last):

  File "c:\Users\ukv-208\Downloads\prac\python\globalandstatic.py", line 15, in <module>

    function1(12)

  File "c:\Users\ukv-208\Downloads\prac\python\globalandstatic.py", line 11, in function1

    l = l + 21

        ^

UnboundLocalError: cannot access local variable 'l' where it is not associated with a value



solutin:- create the local variable and then change it and 

Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)