Given the function header:
myfunction(from):
#some code
I get a syntax error. Is this because "from" is a keyword in Python? If so are all keywords barred from being used as variable names?
Given the function header:
myfunction(from):
#some code
I get a syntax error. Is this because "from" is a keyword in Python? If so are all keywords barred from being used as variable names?
It's a keyword so you can't use it as a name, try:
def my_function(from_):
# some code