I tried this how to tell ubuntu to use python 3.4 instead of 2.7? but nothing.. I have a problem with the nonlocal
This is my code:
x = 50
def func_outer():
x=2
print('x is '), x
def func_inner():
nonlocal x
x=5
func_inner()
print('the local x changed to '),x
=>
nonlocal x
^
SyntaxError: invalid syntax
Do you know how to change it to python 2.7 or any alternative about nonlocal?
#!/usr/bin/env python3
If you want to use python3 – Jacob Vlijm May 01 '16 at 22:46