Newly learned python, write helloword.py hints invalid syntax.?

Source: Internet
Author: User

Specific.

Python version is 2.7.6, text editing is gedit, tried to be feasible, a variety of indentation are invalid syntax.


Novice for advice!

Reply content:

Haha, the landlord is very cute, I seem to see three months ago of their own.
How do I get python to output ' Hello world '?

You enter Python in the terminal, the carriage return, it will appear
>>>
Landlord quit first ()
I think I see

And, you need to put helloworld.py directly to the home directory (home) , for example, when placing helloworld.py in the folder MyStuff under the home directory, the result is as follows
When the helloworld.py is placed directly under the home directory, it will run normally.
Good luck! Good You can run this in a Python interactive environment. You're really good. The >>> in front of you has already entered Python, and this time you play Python.
Direct input of print ' HelloWorld ' can be executed directly
If you want to run a well-written py file, you need to quit and then re-enter me, people are said to be novice, you so good to come in to do, grumble novice used to brush your sense of existence ah, you don't laugh at others useless pycharm, useless pydev, people do not understand can not ask Ah, If you know how to compile the principle can ask, you think everyone will be a language to learn Python, in the Codecademy to learn all the python is not the difference between the editor and the IDE is strange, You numpy on the basis of a pandas let people do the data analysis of the time to waste less than two hours I see, thank you seriously answer that, here because you also let a person feel this stupid world there are some warm if it is in the Windows environment, Put the. py file in the Python32 folder in the C drive, then call the terminal in the Python32 folder and run the file with your command.
importosos.system('python helloword.py')
It's nice of you to be anonymous, or the problem will be a disgrace in your life ...
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.