The new python language prompts Invalid Syntax when writing helloword. py .?

Source: Internet
Author: User
Specific. The python version is 2.7.6, the text editing is gedit, and multiple kinds of indentation that are feasible are invalidsyntax. Beginner's advice!
Specific.

The python version is 2.7.6, the text editing is gedit, and multiple kinds of indentation that are feasible are invalid syntax.


Beginner's advice! Reply: Haha, the landlord is so cute that I saw myself three months ago.
How can we make Python output 'Hello world.

Enter Python in the terminal and press Enter.

>>>
Landlord, Quit () first ()
View me

In addition, you need to set helloworld. py Directly put it in the Home Directory (Home)LowerFor example, if you put helloworld. py in mystuff, the result is as follows:
When you put helloworld. py directly under the Home directory, it will run normally,
Good luck! Good luck! You can run python in this interactive environment. You are really cute. The previous >>> indicates that you have already entered Python. At this time, what else do you do with python ......
Directly input print 'helloworld' to execute it.
If you want to run a prepared py file, you need to quit first and then re-access it. People say it's a newbie. What are you doing when you're so awesome, why don't you laugh at people who are not using pycharm or pydev? If you understand the compilation principle, can you ask this question, do you think anyone will learn python in one language? Is it strange to know the difference between the editor and IDE after learning python in codecademy, you can create a pandas Based on numpy to let people spend less than two hours doing data analysis. Thank you for answering this question carefully, this is because you still make people think that this silly world is so warm. If it is in a windows environment, just put it. put the py file in the python32 folder of drive C, call the terminal in the python32 folder, and run the file with your command.

import osos.system('python helloword.py')
Hello, you are anonymous. Otherwise, this problem will become a shame 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.