Stupid way to learn Python (37)

Source: Internet
Author: User
Tags first string

Exercise 37: Reviewing various symbols

It's time to review your learned symbols and Python keywords, and you'll learn something new in this section. What I'm doing here is a list of all the Python symbols and keywords that are worth mastering.

In this lesson, you need to review every keyword, remember its role and write it down, and then search the Web for its true functionality. Some of the content may not be searchable, so it may be difficult for you, but you still need to keep trying.

If you find something wrong in your memory, write down the correct definition on the index card and try to correct your memory. If you just don't know the definition, write it down and do the research later.

Finally, each symbol and keyword used in the program, you can use a small program to do, you can also try to thank a number of programs to consolidate memory. The key point here is to understand the role of each symbol, to confirm that they are not mistaken, if the wrong to correct it, and then use it in the program, and in this way to consolidate their memory.

Keywords (keywords)
  • and
  • Del
  • From
  • Not
  • While
  • As
  • Elif
  • Global
  • Or
  • With
  • Assert
  • Else
  • If
  • Pass
  • Yield
  • Break
  • Except
  • Import
  • Print
  • Class
  • Exec
  • Inch
  • Raise
  • Continue
  • Finally
  • Is
  • Return
  • Def
  • For
  • Lambda
  • Try
Data type

For each type of data, give some examples, for example, for string, you can cite some strings, for number, you can cite some numbers.

    • True
    • False
    • None
    • Strings
    • Numbers
    • Floats
    • Lists
String escape sequence (escape sequences)

For string escape sequences, you need to apply them in strings to confirm that you know their functionality clearly.

    • \\
    • \‘
    • \"
    • \a emits system ring tones
    • \b Backspace
    • \f Page Break
    • \ n
    • \ r return character
    • \ t
    • \v Portrait tab
String Formatting (string Formats)

The same, use them in strings to confirm their functionality.

  • %d turns into signed decimal number
  • %i turns into signed decimal numbers
  • %o Formatting an unsigned octal number
  • %u format unsigned integer
  • %x format unsigned hexadecimal number
  • %x format unsigned hexadecimal number (uppercase)
  • %e format floating-point numbers with scientific notation
  • %E function with%E, format floating-point numbers with scientific notation
  • %f formatting floating-point numbers to specify the precision after the decimal point
  • %F formatting floating-point numbers to specify the precision after the decimal point
  • %g depends on the size of the value to use%f live%e
  • The%G function is the same as%G, depending on the size of the value%f live%e
  • %c formatted character and its ASCII code
  • %r takes precedence over string conversions with the repr () function
  • %s format string, first string conversion with the STR () function
  • Percent output% (the formatted string includes a percent semicolon, so you must use a percentile)
Operation symbols

Some of the symbols you may not be familiar with, but look at the past, study their functions, if you do not study it is OK, recorded in the future to solve.

  • +
  • -
  • *
  • * * Power-Returns the Y power of X
  • /
  • Divide-Returns the integer part of the quotient
  • %
  • <
  • >
  • <=
  • >=
  • ==
  • !=
  • <> Not Equal-compares two objects for unequal
  • ( )
  • [ ]
  • { }
  • @
  • ,
  • :
  • .
  • =
  • ;
  • +=
  • -=
  • *=
  • /=
  • //=
  • %=
  • **=

It's better to spend one weeks studying these things, if you can finish ahead of time. Our aim is to cover all the symbol types, confirming that you have firmly memorized them. Another important point is that you can figure out what you don't know and find some direction for your future study.

Stupid way to learn Python (37)

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.