b=[[1,2,3],[2,2,3],[4,5,6]]
b[0][2]
Python’s Tuples (1 hr)
Immutable
Common Tuples Methods
Tuples Operations
Tuples Indexing
Tuples Slicing
Tuples Iteration
Multi-Dimensional Tuples (Matrices)
Indexing & Slicing
Iteration
Enumerate
The enumerate function returns a tuple containing a count(index) for every iteration (from start which defaults to 0) and the values obtained from iterating over a sequence.
Tuples are faster than list
Python Dictionaries (2 hr)
Python Dictionaries
Assigning Values to Dictionaries
Dictionary Methods
Dictionaries vs Lists & Tuples
Dictionary Indexing
Dictionary Iteration
Stack – Pop, Push
SETS
loops
Creating Python Function (2hrs)
Function Basics
Defining Functions
Function Polymorphism
Argument Defaults
Lambdas
Local Variables
Understanding __builtin
Preventing Variable Modifications
Argument Matching Methods
Keyword Argument Methods
A lambda function can take any number of arguments, but can only have one expression.
The Python interpreter has a number of functions and types built into it that are always available.
abs()
The abs() is one of the most popular Python built-in functions, which returns the absolute value of a number. A negative value’s absolute is that value is positive.
Errors & Exceptions
#ZeroDivisionError #Syntax Error(EOF Error,Indentation Error) #IOError #ImportError #ValueError #NameError #wrong operation :Type ERROR
Classses & Objects
All classes have a function called init(), which is always executed when the class is being initiated.
This type of function is also called constructors
Inheritance allows us to define a class that inherits all the methods and properties from another class.
Parent class is the class being inherited from, also called base class.
Child class is the class that inherits from another class, also called derived class.
File "<ipython-input-11-30b865ef42a3>", line 3
x = Student("Mike", "Olsen")
^
IndentationError: expected an indented block
Regular Expression in Python (1 hr)
Meta Characters
re module
Search
Match
Hands On
Script merge two list to create a dictionary
Script that creates a user input list & later on converts it to immortal data set.
Script to make a chain of function decorators (bold, italic, underline etc.).
Script to remove leading zeros from an IP address