Object-Oriented Python

Use keyword class to start a class. Class names are capitalized.

Class can have some properties.

Continue Reading…

Python Collections

list1 + list2

Note: l1 + l2 won’t change the value of l1


Append a new item with value x to the end of the array

Continue Reading…

Python Basics

Python Basics

Get Help

  1. Enter the python3 command-line interpretor

  2. Get help for a function, e.g. print(...)

  3. Get help for a class, e.g. class str

  4. Find what variables and methods are available on a class, e.g. class str

  5. Get help for a class method such as rjust(), rjust() is belong to class str

Continue Reading…