I have some python code which is valid python syntax, but fails to run:
a = [1, 2, 3]
b = [3, 2, 1]
c = [a[i] * b[i] for i in range(len(a))]
print(c)
Which produces the following error: Error: NameError: name 'a' is not defined
This code runs fine on my local python interpreter, but not when I run it through this function:
I have some python code which is valid python syntax, but fails to run:
Which produces the following error:
Error: NameError: name 'a' is not defined
This code runs fine on my local python interpreter, but not when I run it through this function:Notably this runs through that function fine:
which should be logically equivalent code Am I setting up the interpreter wrong or something?