The great god retreated for 7 days to organize! 137 pages of Python study notes, a comprehensive summary is enough to read this article

foreword

As one of the most popular programming languages ​​at the moment, Python has been popular from the past few years to the present, and there are even more trends. Not only has it attracted many people in the industry, but people outside the circle have also joined the camp of learning Python.

But when many friends are learning Python, they call out: It's too difficult, I can't learn it! So how should Python be learned? How to turn boring tutorial into easy to understand?

Today I would like to share with you a copy of the Python study notes compiled by the master . The 137-page super-comprehensive summary integrates a core knowledge point into one chapter, which is more organized and refined , and it is convenient for everyone to understand the difficulties of Python. It is very suitable for beginners.

Disclaimer: The information comes from Shuzun.com, compiled and organized by netizens, and is only used for communication and sharing. Invasion and deletion

【----End of article for free! ----】

Table of contents

  • Introduction to Dynamic Type in Python
  • number type
  • Set type
  • string
  • the list
  • tuple
  • general order
  • dictionary
  • document
  • Statements and Grammar
  • assignment statement
  • Print
  • if statement

insert image description here

number type

  • Python numeric constants
  • Numeric type conversion
  • In mixed-type expressions, Python first converts the operand to the type of the most complex operand
  • Python allows to perform consecutive comparisons, and the comparison chain can be arbitrarily long
  • Python's division x/y is different in Python3 and Python2.7
  • Python supports many built-in functions and built-in modules for number processing

insert image description here

general order

  • Python's general sequences include: strings, lists, tuples
  • Python's general sequence operations include: index operation, slice operation, sequence addition, sequence multiplication
  • Three analytical expressions
  • copy of the sequence

insert image description here

Functions and Scope

  • Python functions are written by chef statements. In Python, functions are also an object type.
  • Function parameters do not have any type constraints, nor does the return type
  • Python function definition statement
  • Functions are just object types, function names are just variable names, they have nothing special
  • Code inside a function subject is not run until the function is called. Variable names inside functions are not resolved until the function is actually executed
  • Variables can be defined in three different places, corresponding to three different scopes
  • scope rules
  • Variable Name Lookup Rules

insert image description here

Advanced usage of modules

  • By default, a Python module exports all variable names for values ​​attached to the top level of its module file, and there are no private variable names. All private data is more of a convention than a syntactic constraint
  • When the file is executed as a top-level program file, the module's name attribute is set to the string main. If the file is imported, the name attribute becomes the name of the file name minus the suffix
  • import and from can use as extension to resolve variable name conflicts in this way

insert image description here

[See the picture below for how to get it! !

Data collection

The above-mentioned full version of the full set of learning materials for Python has been uploaded to the CSDN official website. If you need it, you can scan the QR code of the CSDN official certification below on WeChat and enter "receive materials" to receive it.

insert image description here

Good article recommendation

Understand the prospect of python: https://blog.csdn.net/weixin_49891576/article/details/127187029

Learn about python's part-time jobs: https://blog.csdn.net/weixin_49891576/article/details/127125308

Guess you like

Origin blog.csdn.net/weixin_49891576/article/details/131608967