The document provides an overview of the Python programming language including its history, basic syntax, data types, operators, control flow, functions, modules, classes and exceptions.
The document provides an overview of the Python programming language including its history, basic syntax, data types, operators, control flow, functions, modules, classes and exceptions.
AN INTRODUCTION TO PYTHON An example with if and it's related statement
Brief History Why Python LOOPS Where to use The while loop The for loop BEGINNING PYTHON BASICS The range statement The print statement Break & Continue Comments Assert Python Data Structures & Data Types Examples for looping String Operations in Python Simple Input & Output FILE HANDLING Simple Output Formatting File Handling Modes Python Operators Reading Files Writing & Appending to Files PYTHON PROGRAM FLOW Handling File Exceptions Indentation The with statement The If statement and its' related statement PYTHON PYTHON LiST Search the Lists and find elements List commands Lists are mutable Create a Python list Convert a list to a tuple in python List indices How to use the double colon [ : : ]? Add an item to the end of the list Find largest and the smallest items in a list Insert an item at a given position Compare two lists in Python? Modify an element by using the index of the element Nested lists in Python Remove an item from the list How can I get the index of an element contained in the Remove all items from the list list? Slice Elements from a List Using Lists as Stacks Remove the item at the given position in the list, and Using Lists as Queues return it Python Code Editor Return the index in the list of the first item whose value is x Return the number of times 'x' appear in the list Sort the items of the list in place Reverse the elements of the list in place Return a shallow copy of the list PYTHON PYTHON TUPLE PYTHON SET Tuple commands Set commands Create a tuple Create a set in Python How to get an item of the tuple in Python? How to know if an element exists within a tuple in Python? Iteration Over Sets List to tuple Add member(s) in Python set Unpack a tuple in several variables Remove item(s) from Python set Add item in Python tuple! Intersection of sets Clone a tuple Union of sets In Python how to know the number of times an item has set difference in Python repeated Remove an item from a tuple Symmetric difference Slice a tuple issubset and issuperset How to get the index of an item of the tuple in Python? Shallow copy of sets The size of a tuple Clear sets How operators + and * are used with a Python tuple? Slice of a tuple using step parameter. Modify items of a tuple PYTHON PYTHON Dictionary FUNCTIONS & MODULES
Dictionary commands Create your own functions
Create a new dictionary in Python Functions Parameters Get value by key in Python dictionary Variable Arguments Add key/value to a dictionary in Python Scope of a Function Iterate over Python dictionaries using for loops Function Documentation/Docstrings Remove a key from a Python dictionary Lambda Functions & map Sort a Python dictionary by key An Exercise with functions Find the maximum and minimum value of a Python Create a Module dictionary Standard Modules Concatenate two Python dictionaries into a new one Test whether a Python dictionary contains a specific key Find the length of a Python dictionary PYTHON CLASSES IN PYTHON EXCEPTIONS
New Style Classes Errors
Variable Type Exception Handling with try Static Variable in class Handling Multiple Exceptions Creating Classes Writing your own Exceptions Instance Methods Inheritance Polymorphism Encapsulation Scope and Visibility of Variables Exception Classes & Custom Exceptions