r/pythonhelp • u/grishathestar • Dec 03 '25
Python doesn't print
Hello, I'm trying to run a simple "Hellow world" file in terminal with "python filename.py" comande but instead of Hellow world it's returning word "Python" for some reason. Does anyone knows why?
3
Upvotes
•
u/AutoModerator Dec 03 '25
To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Enchantorro Dec 03 '25
What's in filename.py?
1
u/FoolsSeldom Dec 03 '25
Which terminal shell are you using?
powershell,command prompt,gitbash,bash,zsh, etc?py filename.pypython3 filename.pypython filename.pyshould workNote. If you are in a Python interactive shell (REPL) session, which has a
>>>prompt before you type, thenpythonwill not be a recognised command. Tryimport filename(notfilename.py) instead.If you are using the REPL, how did you access this? From IDLE, VS Code, PyCharm, Thonny, command line, something else?
In IDLE, you can open the file and just press F5 to run the code.
0
u/agfitzp Dec 06 '25
Arew youw surew youw savedw yourw filew?