Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.06 KB

README.md

File metadata and controls

44 lines (34 loc) · 1.06 KB

Learning_Python

Includes project files from Coursera An Introduction to Interactive Programming in Python and the Pluralsight Python learning path

Python scopes

=============================================

  • Scopes:
    • Local: Inside the current function
    • Enclosing: Inside enclosing functions
    • Global: At the top level of the module
    • Built-in: In the special bultins module

Names are looked up in the narrowest relevant context.

  • Notes:

    • Dunder = Double Underline
      • Used in naming.
  • Tuple "()" vs Lists "[]":

    • Tuple immutable

Truth Table and

Expression Evaluates to
True and True True
True and False False
False and True False
False and False False

Truth Table or

Expression Evaluates to
True or True True
True or False True
False or True True
False or False False

Truth Table not

Expression Evaluates to
not True False
not False True