A summary of the operational difficulties of python beginners (this article is required for beginners ).

Source: Internet
Author: User

A summary of the operational difficulties of python beginners (this article is required for beginners ).

As follows:

1. switch between the disk and the disk in cmd directly D or d:

2. Find the directory in the current disk or file and run dir directly.

3. To add a folder to a disk, use the cd space to specify the target file cd p.

4. After writing the first letter of the file, press the tab key to automatically complete the file. If there are multiple p prefixes, press the tab to switch between all

5 d: Switch the disk dir to find the directory cd to go to the target file (double-click)

6. Go up to the next layer of cd... go to the next layer of cd... (whether there is any space between them)

7. Open a txt file prepared with notepad in python, and then open the python f: \ Demo \ hello.txt code.

8. What type of suffix should be used for the file?

9 It is troublesome to find the python path during each running. When adding python to an environment variable, you can directly call the program, my e-brain -- properties -- Advanced System settings -- Advanced -- environment variable -- find path -- add the python path.

10 Add any program to the Environment Variable Right-click the program icon-properties-copy 'target'-Add the target to the path (; the semicolon must be in English state, then copy it, then copy it all, cut down the .exe string), open cmd, enter paste to open the program.

The variable 11 must be descriptive. For example, mike is a name = 'Mike ', which makes people know it as a name.

12 variable name when two words can be separated by underscores (_)

13. Use all uppercase variable names to represent constants.

14. The string is enclosed in quotation marks. It occupies a position in the memory, but the variable name does not occupy it. It points to the string in the memory.

15 del Delete the variable del age to manually remove or direct to other memory

16 to print Chinese Characters in py2x vision, add u'' to the front to convert the type to unicode universal code.

17 notepad ++ copy the current row ctrl + D

18 you must save the changes to notepad ++ in cmd to run the changes correctly.

19. Find the file path in cmd and use the tab key to complete the file. You can run the program directly using pathon under each disk.

20 input ('str'), str: This constitutes Interaction

21. The number of wrong lines in cmd corresponds to notepad ++.

22. There is an operation in pad. The cursor should be at the end of the row or on this line.

23. If the values are equal, the value = is assigned.

24. After each sentence, add: indicates that the sentence is finished.

Determine the code to be executed through indentation

25 tab! = (Not equal to) four spaces

26 else cannot appear separately. It must be at the same level as if.

27 it is best to automatically create four spaces for each tab (the original tab is different from the four spaces, and all spaces are required to be empty. tab is required, but tab is not recommended on the official website ), the tab character is tab pad ++. Set the preference language. The tab character is converted to a space.

28. display space and tab characters in the view

29. elif is used as a criterion between if and else.

The above is a summary of the operational difficulties for beginners of python (this article is required for beginners). I hope to give you a reference and support for the help house.

Related Article

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.