Vamsi
Vamsi
Vamsi
PYTHON ESSENTIALS
INTERNSHIP INSTRUCTOR: CISCO NETWORKING ACADEMY
PREPARED BY:
KATTAMREDDY VENKATA VAMSI KRISHNA REDDY
222U5A0203
PYTHON ESSENTIALS-1
• Introduction
• Data types
• Loops
• Functions
PYTHON ESSENTIALS-2
• Packages
• Strings
• Object oriented programming
• Miscellaneous
INTRODUCTION
• Python is a high-level programming language known for its simplicity
and readability
• It is easy to learn
• It is an interpreted language
• Python has extensive libraries
• It can be run on any platform
• Python is open source language
DATA TYPES
• The data types in python are:
• Int
• Float
• Str
• Bool
• Variables are used to store data values
• The input and output operations in python is given as:
• Input
• Print
• The operators in python are:
• Arithmetic
• Comparison
• Logical
• assignment
LOOPS
• Boolean values are used in comparisons and logical operations
• True
• False
• Conditional execution:
• if
• elif
• else
• Loops are used to iterate over a sequence until the condition is true
• for
• while
➢Attributes:
• Instance attributes are the variables that are unique to each instance
• Class attributes are the variables that are shared among all instances of a class
➢Methods
• Instance methods are the functions defined within in a class that operate on instance of that class
• Class methods are the functions operate on the class itself, rather than on instances of the class
• Static methods are the functions defined within in a class that do not operate on instances or the class
➢Encapsulation
• Encapsulation is the bundling of data and methods that operate on that data within one unit
➢Inheritance
• Inheritance allows the class to inherit attributes and methods from another class. The class being
inherited from is called “parent ” class and the class inherits is called “child” class
➢Polymorphism
• Polymorphism allows for methods to be used interchangeably, even if they belong to different classes, as
long as those classes implement the method
➢Abstraction
• Abstraction is the concept of hiding the complex implementation details and showing only the essential
features of the object
MISCELLANEOUS
• File handling
• Opening a file
• Reading from a file
• Writing to a file
• Using with statement
• Comprehensions
• List Comprehensions
• Dictionary Comprehensions
• Set Comprehensions
• Generator expressions
• Lambda functions- anonymous, inline functions defined with lambda
• Map, filter, reduce
• Map()-applies function to all items in an input list
• Filter()-filters items out of a list
• Reduce()- reduces list to a single value
• Decorators- functions that modify the behaviour of other functions
• Iterators- an object that can be iterated upon
• Generators- a function that returns an iterator and produces a sequence of
values
• Context managers- use with statements to manage resources
• Datetime module- it supplies classes for manipulating dates and times in
both simple and complex ways
• Regular expressions- these are the sequence of characters that form search
patterns
• JSON handling- javascript object notation is light weighted data-
interchange format
• Logging- the logging module in python is used to record messages that can
help in diagnosing problems
• Argparse- tis provides way to handle command-line arguments passed to a
python script
• Virtual environments- these are self-contained directories that contain a
python installation for particular version
THANK YOU