When I write python music_player.py in the windows command prompt the file runs successfully. 
But When I try the same with the music_player.py shortcut file python "music_player.py - Shortcut.lnk" it gives me this error:
Traceback (most recent call last):
File "E:\Music\music_player.py - Shortcut.lnk", line 1, in <module>
NameError: name 'L' is not defined
Also if I try to open a .py file with Python then it shows the same error.
But now I uninstalled Python2 and also restarted my PC.
So my questions are:
- If I write
python music_player.pyin Command Prompt it will run successfully, But if I try the same with themusic_player.pyshortcut file it shows me this error
Traceback (most recent call last):
File "E:\Music\music_player.py - Shortcut.lnk", line 1, in <module>
NameError: name 'L' is not defined
- If I right-click on any Python file and use
Open With PythonI get the same error.
Note:
- This all happens since I installed python2.
- All code is written in Python3
- My code work in
vscodeandThonny. - All Code Is Available On My Github Repository(Too Many Lines Of Code).


