简体   繁体   中英

Python code throws error while running in Visual Studio

I am absolutely new to Python. I tried running this code

someone = 'Lovegood'
print (someone)

And I am getting this error

Traceback (most recent call last): File "", line 1, in NameError: name 'someone' is not defined **

Can someone please help me?

Check whether you have selected a python interpreter in the visual studio or not. Also, make sure to save the file with a.py extension.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM