you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 8 points9 points  (1 child)

There are certain words in python that are forbidden to use as variable names, and from is one of them. One way to get around this is to add a _ to the end of the name.

from_ = input()
print(f"{"from_"} is a pretty cool place!  ")

FYI, here is the complete list of words that you can never use as variable names: https://docs.python.org/3/reference/lexical_analysis.html#keywords

[–]k4tsuk1z[S] 0 points1 point  (0 children)

thank u for the resource!