Python basic class daily finishing (i)

Source: Internet
Author: User
Tags clear screen create directory directory create

01_linux Foundation
1. What is the role of the operating system?
The operating system is the first layer of software configured on the computer hardware, the main role is to manage the hardware devices.
What are the 2.Linux root directories and home directories used in the respective presentation?
/indicates root directory, ~ indicates home directory
3.Linux relative path and absolute path?
Paths starting with the root directory (/) or home directory (~) are called absolute paths, which are called relative paths.
4. Introduction of common terminal commands.
LS List view the contents of the current folder
PWD Print Wrok directory view your current folder
CD [directory name] Change Directory switch folder
touch [filename] Touch If the file does not exist, create a new file
mkdir [directory name] make directory Create directory
RM [File name] Remove removes the specified file name by removing the directory, you need to add the-r option
Clear clear Clear screen
5. Directories or files in Linux that begin with. are hidden files, and you want to see them, you can display all the files by Ls–a.
Common parameters for 6.CD commands
Cd Direct Enter is the home directory to go to the current user
Cd ~ also go to the home directory
Cd. Current directory
Cd.. Return to the top level directory
Cd/Return root directory
cd– switch back and forth between the last two working directories
7. Copy command CP
Cp Source File Destination file
Add-r option if you want to copy a directory
8. Move the command MV
Mv Source File Destination file
9. Delete file Directory command rm
Rm can only delete files by default
Removing a directory requires the-r option
10. Two commands to view the contents of a file cat and more
Cat display all content, suitable for less content documents,-n Display line number-B display non-blank line number
More is split screen display, suitable for more than the content of the document
11. redirect > and >>

Represents an overlay
> Represents an additional
12.grep Find command
Grep to find the content file
-N Display Line number
-V Take anti-I ignore case
13. The role of pipelines
Command 1 | Command 2
The output of the previous command as input to the second command
Common pipe command grep more
Ps aux | grep xx
02_python Foundation _day01

  1. Python Quotes
    Life's too short, I use Python (Live is short,you need Python)
  2. Python founder Guido van Rossum (Uncle Tortoise), 1991 the first version of Python open source.
  3. The design philosophy of Python
    Elegant, clear and simple
  4. The pros and cons of Python
    Pros: Fully object-oriented language, powerful Standard Edition, and community-wide range of third-party modules
    Disadvantage: Running speed is not as good as compiling language, small domestic market, lack of Chinese information
  5. Introduction to Python version
    Python2.x is the past, the last stable version is 2.7 (over version)
    Python3.x is the current and future trend, the latest is 3.6 2.0 does not support Chinese = = "The biggest difference
  6. Three ways to execute Python
    ① interpreter. Python/python3 python file
    Python xxx.py
    Python3 xxx.py
    ② run in interactive mode.
    Enter Python or Python3 directly in the terminal to enter the official interactive mode, but this method can not save code, not suitable for running too large programs, better than the official interactive mode is Ipython
    ③ running with integrated environment IDE
    Pycharm can run Python programs

Python basic class daily finishing (i)

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.