Sorry for the vague title, but I am unsure how else to explain it. Running the command in terminal:
python --version
Outputs:
Python 3.9.10
When I try to run my main.py file using the command: python main.py or python3 main.py nothing outputs. I am new to Python and this was just working but I restarted my computer and now I cant get any of my Python scripts to output or run.
This is all that my main.py is:
def main():
print("hello world")
Does anyone have any ideas?
>Solution :
You have to call the function:
def main():
print("hello world")
main()