PYTHON SYLLABUS
1) LANGUAGE FUNDAMENTALS
Introduction
Features of Python
1) Simple and Easy to Learn
2) Freeware and Open Source
3) High Level Programming Language
4) Platform Independent
5) Portability
6) Dynamically Typed
7) Both Procedure Oriented and Object Oriented
8) Interpreted
9) Extensible
10) Embedded
11) Extensive Library
Limitations of Python
Flavors of Python
1) CPython
2) Jython OR JPython
3) IronPython
4) PyPy
5) RubyPython
6) AnacondaPython
I
DATA TYPES
1) int Data Type
Decimal Form
Binary Form
Octal Form
Hexa Decimal Form
2) Float Data Type
3) Complex Data Type
4) bool Data Type
5) str Data Type
6) bytes Data Type
7) bytearray Data Type
8) List Data Type
9) Tuple Data Type
10) Range Data Type
11) Set Data Type
12) frozenset Data Type
13) dict Data Type
14) None Data Type
Base Conversions
Slicing of Strings
TYPE CASTING
int()
float()
complex()
bool()
str()
Fundamental Data Types vs Immutability
Escape Characters
Constants
2) OPERATOR
1) Arithmetic Operators
2) Relational Operators OR Comparison Operators
3) Equality Operators
4) Logical Operators
5) Bitwise Oeprators
Bitwise Complement Operator (~)
6) Shift Operators
<< Left Shift Operator
>> Right Shift Operator
7) Assignment operators
8) Ternary Operator OR Conditional Operator
9) Special operators
Identity Operators
Membership operators
֍ Operator Precedence
֍ Mathematical Functions (math Module)
֍ Command Line Arguments
֍ Output Statements
3) FLOW CONTROL6
֍ Conditional Statements
if
if-elif
if-elif-else
֍ Iterative Statements
for
while
֍ Transfer Statements
break
continue
pass
֍ Loops with else Block
֍ del Statement
֍ Difference between del and None
4) STRING DATA TYPE
# What is String?
# How to define multi-line String Literals?
# How to Access Characters of a String?
Accessing Characters By using Index
Accessing Characters by using Slice Operator
# Behaviour of Slice Operator
# Slice Operator Case Study
# Mathematical Operators for String
# len() in-built
Function #
Checking
Membership #
Comparison of
Strings
# Removing Spaces from the String
rstrip()
lstrip()
strip()
# Finding Substrings
# Counting substring in the
given String # Replacing a
String with another String #
Splitting of String
# Joining of Strings
# Changing Case of a String
# Checking Starting and Ending Part of the String
s.startswith(substring)
s.endswith(substring)
# To Check Type of Characters Present in a String
# Formatting the Strings
# Important Programs regarding String Concept
1) Program to Reverse the given String
2) Program to Reverse Order of Words
3) Program to Reverse Internal Content of each
Word
4) Program to Print Characters at Odd Position
and Even Position for the given String
5) Program to Merge Characters of 2 Strings into
a Single String by taking Characters
alternatively
6) Program to Sort the Characters of the String
and First Alphabet Symbols followed by
Numeric Values
7) Program for the following Requirement (Input:
a4b3c2, Output: aaaabbbcc)
8) Program to perform the following Activity
(Input: a4k3b2, Outpt: aeknbd)
9) Program to Remove Duplicate Characters
from the given Input String
10) Program to find the Number of Occurrences of
each Character present in the given String
11) Program to perform the following Task
Input: 'one two three four five six
seven'
Output: 'one owt three ruof five xis
seven'
# Formatting the Strings
5) LIST DATA STRUCTURE
# Creation of List Objects
# Accessing Elements of List0
By using Index
By using Slice Operator
# List vs Mutability
# Traversing the Elements of List
By using while Loop
By using for Loop
To display only Even Numbers
To display Elements by Index wise
# Important Functions of List
> To get Information about List
len()
count()
index()
> Manipulating Elements of List
append()
insert()
extend()
remove()
pop()
> Ordering Elements of List
reverse()
sort()
# Using Mathematical Operators for List Objects
Concatenation Operator (+)
Repetition Operator (*)
# Comparing List Objects
# Membership Operators
in Operator
not in Operator
# clear() Function
# Nested Lists
# Nested List as Matrix
# List Comprehensions
6) TUPLE DATA STRUCTURE
# Tuple Creation
# Accessing Elements of Tuple
By using Index
By using Slice Operator
# Tuple vs Immutability
# Mathematical Operators for Tuple
Concatenation Operator (+)
Multiplication Operator OR Repetition Operator (*)
# Important Functions of Tuple
len()
count()
index()
sorted()
min() And max()
cmp()
# Tuple Packing and Unpacking
# Tuple Comprehension
# Differences between List and Tuple
7) SET DATA STRUCTURE
# Creation of Set Objects
# Important Functions of Set
add(x)
update(x,y,z)
copy()
pop()
remove(x)
discard(x)
clear()
# Mathematical Operations on the Set
union()
intersection()
difference()
symmetric_difference()
# Membership Operators: (in, not in)
# Set Comprehension
8) DICTIONARY DATA STRUCTURE
# How to Create Dictionary?
# How to Access Data from the Dictionary?
# How to Update Dictionaries?
# How to Delete Elements from Dictionary?
del d[key]
d.clear()
del d
# Important Functions of Dictionary
dict()
len()
clear()
get()
pop()
popitem()
keys()
values()
items()
copy()
setdefault()
update()
# Dictionary Comprehension
9) FUNCTIONS
# Built in Functions
# User Defined Functions
# Parameters
# Return Statement
# Returning Multiple Values from a Function
# Types of Arguments
Positional Arguments
Keyword Arguments
Default Arguments
Variable Length Arguments
# Case Study
# Types of Variables
Global Variables
Local Variables
# global Keyword
# Recursive Functions
# Anonymous Functions
# Normal
Function #
Lambda
Function #
filter()
Function #
map()
Function
# reduce() Function
# Everything is an Object
# Function Aliasing
# Nested Functions
10) MODULES
# Renaming a Module at the time of import (Module Aliasing)
# from ... import
# Various Possibilties of import
# Member Aliasing
# Reloading a Module
# Finding Members of Module by using dir() Function
# The Special Variable name
# Working with math Module
# Working with random Module
random() Function
randint() Function
uniform() Function
randrange ([start], stop, [step])
choice() Function