Some commonly used key words

  • and: a calculation expression indicating a logical AND operation
  • as: the type of conversion
  • assert: whether to assert or variable for determining the value of the conditional expression is true
  • break: the loop terminates task
  • class: class is used to define
  • continue: skip this cycle, the next cycle continues
  • def: a function or method used to define the
  • del: delete a variable or a sequence of values
  • elif: conditional statements, in conjunction with else
  • else: conditional statements, and if used in conjunction with elif. Or an abnormality may also be cyclic
  • except: code comprising capturing operation exception, in combination with the try and finally
  • for: loop
  • finally: After the statement for an exception, an exception, always execute the code block finally contained. And try. except in combination
  • from: import module for use in conjunction with import
  • global: define global variables
  • if: conditional statements, and else. elif used in combination
  • import: import module for, in combination with from
  • is: determining whether a variable is an instance of a class
  • lambda: anonymous function definitions
  • nonlocal: a variable for identifying external scope
  • not: for arithmetic expressions, logical negation operation
  • or: arithmetic expression for representing the logical operations or
  • pass: empty class, function, method placeholder
  • raise: exception is thrown operation.
  • return: the calculation result for the function returns
  • try: include statements may appear abnormal, and except, finally used in combination
  • while: loop
  • with: python simplified statement
  • yield: return value from the function for sequentially

Guess you like

Origin www.cnblogs.com/erlang-/p/11536397.html