SlideShare a Scribd company logo
1 of 24
Python
PYTHON IS AN INTERPRETED, OBJECT-ORIENTED, HIGH-LEVEL
PROGRAMMING LANGUAGE WITH DYNAMIC SEMANTICS. ITS
HIGH-LEVEL BUILT IN DATA STRUCTURES, COMBINED WITH
DYNAMIC TYPING AND DYNAMIC BINDING, MAKE IT VERY
ATTRACTIVE FOR RAPID APPLICATION DEVELOPMENT, AS WELL
AS FOR USE AS A SCRIPTING OR GLUE LANGUAGE TO CONNECT
EXISTING COMPONENTS TOGETHER. PYTHON’S SIMPLE, EASY TO
LEARN SYNTAX EMPHASIZES READABILITY AND THEREFORE
REDUCES THE COST OF PROGRAM MAINTENANCE.
Variables in python
A variable is a name given to a memory location. It is the
basic unit of storage in a program.
The value stored in a variable can be changed during
program execution.
A variable is only a name given to a memory location, all
the operations done on the variable effects that memory
location.
Data types in python
It represents the kind of value that tells what operations can be
performed on a particular data.
Python has many native data types. Here are the important ones:
Booleans are either True or False.
Numbers can be integers (1 and 2), floats (1.1 and 1.2), fractions
(1/2 and 2/3), or even complex numbers.
Strings are sequences of Unicode characters, e.g. an HTML
document.
Bytes and byte arrays, e.g. a JPEG image file.
Lists are ordered sequences of values.
Tuples are ordered, immutable sequences of values.
Sets are unordered bags of values.
Python operator
There are there types of operators –
1.Arithmetic Operator
2.Relational operator
3.Logical operator
1.Arithmetic operator- Arithmetic operators are used with numeric
values to perform common mathematical operations:
2.Relational operators -
Relational operators are used for comparing the values.
3.Logical operator-
Logical operators are used on conditional statements (either True or False). They perform
Logical AND, Logical OR and Logical NOT operations.
Python tokens
All statements and instructions in a program are built with
tokens. The various tokens in python are :
1. Keywords
2. Identitiers
3. Literals
4. Operators
1.Keywords: -Keywords are words that have some special meaning or significance in a
programming language. They can’t be used as variable names, function names, or any
other random purpose.
2.Identifiers: Identifiers are the names given to any variable, function, class, list, methods,
etc. for their identification. Python is a case-sensitive language and it has some rules
and regulations to name an identifier
3.Literals or Values: Literals are the fixed values or data items used in a source code.
Data structures in Python
The basic Python data structures in Python include list, set,
tuples, and dictionary. Each of the data structures is unique in
its own way. Data structures are “containers” that organize and
group data according to type.
Tuple in python
 Tuples are used to store multiple items in a single variable.

 Tuple is one of 4 built-in data types in Python used to store collections of data, the other 3
are List, Set, and Dictionary, all with different qualities and usage.

 A tuple is a collection which is ordered and unchangeable.

 Tuples are written with round brackets.
Basics operations in tuples-Tuples respond to
the + and * operators much like strings; they
mean concatenation and repetition here too,
except that the result is a new tuple, not a string.
Built-in Tuple Functions-
Python includes the following tuple
functions −
List in python -
The list is a most versatile datatype available in Python which
can be written as a list of comma-separated values (items)
between square brackets. Important thing about a list is that
items in a list need not be of the same type.
Creating a list is as simple as putting different comma-
separated values between square brackets. For example −
list1 = [‘physics’, ‘chemistry’, 1997, 2000]; list2 = [1, 2, 3, 4, 5 ];
list3 = [“a”, “b”, “c”, “d”];
 Given below are some of the most widely used list operations in Python:
 A few of the basic list operations used in Python programming are extend(), insert(),
append(), remove(), pop(), slice, reverse(), min() & max(), concatenate(), count(),
multiply(), sort(), index(), clear(), etc.

 myList = [1, 2, 3, ‘EduCBA’, ‘makes learning fun!’]
1. append()-
The append() method is used to add elements at the end of the list. This method can only
add a single element at a time. To add multiple elements, the append() method can be
used inside a loop.
Code:
My list.append(4)
2. extend()
The extend() method is used to add more than
one element at the end of the list. Although it
can add more than one element, unlike
append(), it adds them at the end of the list like
append().
Code:
myList.extend([4, 5, 6])
for I in range(7, 9):
myList.append(i)
print(myList)
3. insert()-
The insert() method can add an element at a given position in the list. Thus,
unlike append(), it can add elements at any position, but like append(), it can
add only one element at a time. This method takes two arguments. The first
argument specifies the position, and the second argument specifies the
element to be inserted.
Code:
myList.insert(3, 4)
myList.insert(4, 5)
myList.insert(5, 6)
print(myList)
Sets
Sets are used to store multiple items in a single variable.
Set is one of 4 built-in data types in Python used to store collections of data, the other 3
are List, Tuple, and Dictionary, all with different qualities and usage.
A set is a collection which is unordered, unchangeable*, and unindexed.
Dictionary in python-
Sets are used to store multiple items in a single variable.
Set is one of 4 built-in data types in Python used to store collections of data, the other 3
are List, Tuple, and Dictionary, all with different qualities and usage.
A set is a collection which is unordered, unchangeable*, and unindexed.
 Dictionaries are written with curly brackets, and have keys and values
Looping statement-
If we want to execute a group of statements multiple times, then we should go for a
looping kind of execution. There are two types of loops available in python. They are:
1.while loop
2.for loop
1.While loop- A "While" Loop is used to repeat a specific block of code
an unknown number of times, until a condition is met.
2.For loop- for loops are used when you have a block of code which you want to
repeat a fixed number of times.
Conclusion-
It is manifest that Python is a robust, high-level programming
language with easy-to-read code lines. Its extensive support and
power have made Python a superior programming language across
the globe. It has gained importance across the globe as computer
giant Google has made it one of its official programming languages.

More Related Content

Similar to Phython presentation

Python for Everybody - Solution Challenge 2021
Python for Everybody - Solution Challenge 2021Python for Everybody - Solution Challenge 2021
Python for Everybody - Solution Challenge 2021AshwinRaj57
 
Stacks in Python will be made using lists.pdf
Stacks in Python will be made using lists.pdfStacks in Python will be made using lists.pdf
Stacks in Python will be made using lists.pdfDeeptiMalhotra19
 
python full notes data types string and tuple
python full notes data types string and tuplepython full notes data types string and tuple
python full notes data types string and tupleSukhpreetSingh519414
 
Python - Module 1.ppt
Python - Module 1.pptPython - Module 1.ppt
Python - Module 1.pptjaba kumar
 
Government Polytechnic Arvi-1.pptx
Government Polytechnic Arvi-1.pptxGovernment Polytechnic Arvi-1.pptx
Government Polytechnic Arvi-1.pptxShivamDenge
 
2.Data_Strucures_and_modules.pptx
2.Data_Strucures_and_modules.pptx2.Data_Strucures_and_modules.pptx
2.Data_Strucures_and_modules.pptxMohamed Essam
 
Interview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfInterview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfExaminationSectionMR
 
trisha comp ppt.pptx
trisha comp ppt.pptxtrisha comp ppt.pptx
trisha comp ppt.pptxTapaswini14
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Chariza Pladin
 
Python Interview Questions For Freshers
Python Interview Questions For FreshersPython Interview Questions For Freshers
Python Interview Questions For Fresherszynofustechnology
 
Programming in Civil Engineering_UNIT 2_NOTES
Programming in Civil Engineering_UNIT 2_NOTESProgramming in Civil Engineering_UNIT 2_NOTES
Programming in Civil Engineering_UNIT 2_NOTESRushikesh Kolhe
 
Python Interview Questions And Answers
Python Interview Questions And AnswersPython Interview Questions And Answers
Python Interview Questions And AnswersH2Kinfosys
 

Similar to Phython presentation (20)

Python for Everybody - Solution Challenge 2021
Python for Everybody - Solution Challenge 2021Python for Everybody - Solution Challenge 2021
Python for Everybody - Solution Challenge 2021
 
Stacks in Python will be made using lists.pdf
Stacks in Python will be made using lists.pdfStacks in Python will be made using lists.pdf
Stacks in Python will be made using lists.pdf
 
Python
PythonPython
Python
 
python full notes data types string and tuple
python full notes data types string and tuplepython full notes data types string and tuple
python full notes data types string and tuple
 
Python - Module 1.ppt
Python - Module 1.pptPython - Module 1.ppt
Python - Module 1.ppt
 
Python_IoT.pptx
Python_IoT.pptxPython_IoT.pptx
Python_IoT.pptx
 
Government Polytechnic Arvi-1.pptx
Government Polytechnic Arvi-1.pptxGovernment Polytechnic Arvi-1.pptx
Government Polytechnic Arvi-1.pptx
 
Shivam PPT.pptx
Shivam PPT.pptxShivam PPT.pptx
Shivam PPT.pptx
 
PYTHON 101.pptx
PYTHON 101.pptxPYTHON 101.pptx
PYTHON 101.pptx
 
GE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_NotesGE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_Notes
 
2.Data_Strucures_and_modules.pptx
2.Data_Strucures_and_modules.pptx2.Data_Strucures_and_modules.pptx
2.Data_Strucures_and_modules.pptx
 
Ch-8.pdf
Ch-8.pdfCh-8.pdf
Ch-8.pdf
 
Interview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfInterview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdf
 
trisha comp ppt.pptx
trisha comp ppt.pptxtrisha comp ppt.pptx
trisha comp ppt.pptx
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3
 
Intro to python
Intro to pythonIntro to python
Intro to python
 
Python Interview Questions For Freshers
Python Interview Questions For FreshersPython Interview Questions For Freshers
Python Interview Questions For Freshers
 
G0361034038
G0361034038G0361034038
G0361034038
 
Programming in Civil Engineering_UNIT 2_NOTES
Programming in Civil Engineering_UNIT 2_NOTESProgramming in Civil Engineering_UNIT 2_NOTES
Programming in Civil Engineering_UNIT 2_NOTES
 
Python Interview Questions And Answers
Python Interview Questions And AnswersPython Interview Questions And Answers
Python Interview Questions And Answers
 

Recently uploaded

VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...Suhani Kapoor
 
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...Suhani Kapoor
 
阿德莱德大学本科毕业证成绩单咨询(书英文硕士学位证)
阿德莱德大学本科毕业证成绩单咨询(书英文硕士学位证)阿德莱德大学本科毕业证成绩单咨询(书英文硕士学位证)
阿德莱德大学本科毕业证成绩单咨询(书英文硕士学位证)obuhobo
 
Black and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfBlack and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfpadillaangelina0023
 
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home MadeDubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Madekojalkojal131
 
Call Girls Mukherjee Nagar Delhi reach out to us at ☎ 9711199012
Call Girls Mukherjee Nagar Delhi reach out to us at ☎ 9711199012Call Girls Mukherjee Nagar Delhi reach out to us at ☎ 9711199012
Call Girls Mukherjee Nagar Delhi reach out to us at ☎ 9711199012rehmti665
 
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Service
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Service
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Servicejennyeacort
 
do's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Jobdo's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of JobRemote DBA Services
 
How to Find the Best NEET Coaching in Indore (2).pdf
How to Find the Best NEET Coaching in Indore (2).pdfHow to Find the Best NEET Coaching in Indore (2).pdf
How to Find the Best NEET Coaching in Indore (2).pdfmayank158542
 
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证女王大学硕士毕业证成绩单(加急办理)认证海外毕业证
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证obuhobo
 
Call Girl in Low Price Delhi Punjabi Bagh 9711199012
Call Girl in Low Price Delhi Punjabi Bagh  9711199012Call Girl in Low Price Delhi Punjabi Bagh  9711199012
Call Girl in Low Price Delhi Punjabi Bagh 9711199012sapnasaifi408
 
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...gurkirankumar98700
 
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service CuttackVIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service CuttackSuhani Kapoor
 
NPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdfNPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdfDivyeshPatel234692
 
Final Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipFinal Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipSoham Mondal
 
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...Suhani Kapoor
 
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girls
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call GirlsDelhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girls
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girlsshivangimorya083
 
Gray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdfGray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdfpadillaangelina0023
 

Recently uploaded (20)

VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
VIP High Profile Call Girls Jamshedpur Aarushi 8250192130 Independent Escort ...
 
Call Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
Call Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCeCall Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
Call Girls In Prashant Vihar꧁❤ 🔝 9953056974🔝❤꧂ Escort ServiCe
 
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
VIP Call Girls Service Saharanpur Aishwarya 8250192130 Independent Escort Ser...
 
阿德莱德大学本科毕业证成绩单咨询(书英文硕士学位证)
阿德莱德大学本科毕业证成绩单咨询(书英文硕士学位证)阿德莱德大学本科毕业证成绩单咨询(书英文硕士学位证)
阿德莱德大学本科毕业证成绩单咨询(书英文硕士学位证)
 
Black and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdfBlack and White Minimalist Co Letter.pdf
Black and White Minimalist Co Letter.pdf
 
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home MadeDubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
Dubai Call Girls Naija O525547819 Call Girls In Dubai Home Made
 
Call Girls Mukherjee Nagar Delhi reach out to us at ☎ 9711199012
Call Girls Mukherjee Nagar Delhi reach out to us at ☎ 9711199012Call Girls Mukherjee Nagar Delhi reach out to us at ☎ 9711199012
Call Girls Mukherjee Nagar Delhi reach out to us at ☎ 9711199012
 
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Service
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts ServiceCall Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Service
Call Girls In Bhikaji Cama Place 24/7✡️9711147426✡️ Escorts Service
 
do's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Jobdo's and don'ts in Telephone Interview of Job
do's and don'ts in Telephone Interview of Job
 
How to Find the Best NEET Coaching in Indore (2).pdf
How to Find the Best NEET Coaching in Indore (2).pdfHow to Find the Best NEET Coaching in Indore (2).pdf
How to Find the Best NEET Coaching in Indore (2).pdf
 
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证女王大学硕士毕业证成绩单(加急办理)认证海外毕业证
女王大学硕士毕业证成绩单(加急办理)认证海外毕业证
 
Call Girl in Low Price Delhi Punjabi Bagh 9711199012
Call Girl in Low Price Delhi Punjabi Bagh  9711199012Call Girl in Low Price Delhi Punjabi Bagh  9711199012
Call Girl in Low Price Delhi Punjabi Bagh 9711199012
 
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
(Call Girls) in Lucknow Real photos of Female Escorts 👩🏼‍❤️‍💋‍👩🏻 8923113531 ➝...
 
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service CuttackVIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
VIP Call Girls in Cuttack Aarohi 8250192130 Independent Escort Service Cuttack
 
NPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdfNPPE STUDY GUIDE - NOV2021_study_104040.pdf
NPPE STUDY GUIDE - NOV2021_study_104040.pdf
 
Final Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management InternshipFinal Completion Certificate of Marketing Management Internship
Final Completion Certificate of Marketing Management Internship
 
FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974
FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974
FULL ENJOY Call Girls In Gautam Nagar (Delhi) Call Us 9953056974
 
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...
Low Rate Call Girls Gorakhpur Anika 8250192130 Independent Escort Service Gor...
 
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girls
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call GirlsDelhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girls
Delhi Call Girls In Atta Market 9711199012 Book Your One night Stand Call Girls
 
Gray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdfGray Gold Clean CV Resume2024tod (1).pdf
Gray Gold Clean CV Resume2024tod (1).pdf
 

Phython presentation

  • 1. Python PYTHON IS AN INTERPRETED, OBJECT-ORIENTED, HIGH-LEVEL PROGRAMMING LANGUAGE WITH DYNAMIC SEMANTICS. ITS HIGH-LEVEL BUILT IN DATA STRUCTURES, COMBINED WITH DYNAMIC TYPING AND DYNAMIC BINDING, MAKE IT VERY ATTRACTIVE FOR RAPID APPLICATION DEVELOPMENT, AS WELL AS FOR USE AS A SCRIPTING OR GLUE LANGUAGE TO CONNECT EXISTING COMPONENTS TOGETHER. PYTHON’S SIMPLE, EASY TO LEARN SYNTAX EMPHASIZES READABILITY AND THEREFORE REDUCES THE COST OF PROGRAM MAINTENANCE.
  • 2. Variables in python A variable is a name given to a memory location. It is the basic unit of storage in a program. The value stored in a variable can be changed during program execution. A variable is only a name given to a memory location, all the operations done on the variable effects that memory location.
  • 3. Data types in python It represents the kind of value that tells what operations can be performed on a particular data. Python has many native data types. Here are the important ones: Booleans are either True or False. Numbers can be integers (1 and 2), floats (1.1 and 1.2), fractions (1/2 and 2/3), or even complex numbers. Strings are sequences of Unicode characters, e.g. an HTML document.
  • 4. Bytes and byte arrays, e.g. a JPEG image file. Lists are ordered sequences of values. Tuples are ordered, immutable sequences of values. Sets are unordered bags of values.
  • 5. Python operator There are there types of operators – 1.Arithmetic Operator 2.Relational operator 3.Logical operator 1.Arithmetic operator- Arithmetic operators are used with numeric values to perform common mathematical operations:
  • 6.
  • 7. 2.Relational operators - Relational operators are used for comparing the values.
  • 8. 3.Logical operator- Logical operators are used on conditional statements (either True or False). They perform Logical AND, Logical OR and Logical NOT operations.
  • 9. Python tokens All statements and instructions in a program are built with tokens. The various tokens in python are : 1. Keywords 2. Identitiers 3. Literals 4. Operators
  • 10. 1.Keywords: -Keywords are words that have some special meaning or significance in a programming language. They can’t be used as variable names, function names, or any other random purpose. 2.Identifiers: Identifiers are the names given to any variable, function, class, list, methods, etc. for their identification. Python is a case-sensitive language and it has some rules and regulations to name an identifier 3.Literals or Values: Literals are the fixed values or data items used in a source code.
  • 11. Data structures in Python The basic Python data structures in Python include list, set, tuples, and dictionary. Each of the data structures is unique in its own way. Data structures are “containers” that organize and group data according to type.
  • 12. Tuple in python  Tuples are used to store multiple items in a single variable.   Tuple is one of 4 built-in data types in Python used to store collections of data, the other 3 are List, Set, and Dictionary, all with different qualities and usage.   A tuple is a collection which is ordered and unchangeable.   Tuples are written with round brackets.
  • 13. Basics operations in tuples-Tuples respond to the + and * operators much like strings; they mean concatenation and repetition here too, except that the result is a new tuple, not a string.
  • 14. Built-in Tuple Functions- Python includes the following tuple functions −
  • 15. List in python - The list is a most versatile datatype available in Python which can be written as a list of comma-separated values (items) between square brackets. Important thing about a list is that items in a list need not be of the same type. Creating a list is as simple as putting different comma- separated values between square brackets. For example − list1 = [‘physics’, ‘chemistry’, 1997, 2000]; list2 = [1, 2, 3, 4, 5 ]; list3 = [“a”, “b”, “c”, “d”];
  • 16.
  • 17.  Given below are some of the most widely used list operations in Python:  A few of the basic list operations used in Python programming are extend(), insert(), append(), remove(), pop(), slice, reverse(), min() & max(), concatenate(), count(), multiply(), sort(), index(), clear(), etc.   myList = [1, 2, 3, ‘EduCBA’, ‘makes learning fun!’] 1. append()- The append() method is used to add elements at the end of the list. This method can only add a single element at a time. To add multiple elements, the append() method can be used inside a loop. Code: My list.append(4)
  • 18. 2. extend() The extend() method is used to add more than one element at the end of the list. Although it can add more than one element, unlike append(), it adds them at the end of the list like append(). Code: myList.extend([4, 5, 6]) for I in range(7, 9): myList.append(i) print(myList)
  • 19. 3. insert()- The insert() method can add an element at a given position in the list. Thus, unlike append(), it can add elements at any position, but like append(), it can add only one element at a time. This method takes two arguments. The first argument specifies the position, and the second argument specifies the element to be inserted. Code: myList.insert(3, 4) myList.insert(4, 5) myList.insert(5, 6) print(myList)
  • 20.
  • 21. Sets Sets are used to store multiple items in a single variable. Set is one of 4 built-in data types in Python used to store collections of data, the other 3 are List, Tuple, and Dictionary, all with different qualities and usage. A set is a collection which is unordered, unchangeable*, and unindexed.
  • 22. Dictionary in python- Sets are used to store multiple items in a single variable. Set is one of 4 built-in data types in Python used to store collections of data, the other 3 are List, Tuple, and Dictionary, all with different qualities and usage. A set is a collection which is unordered, unchangeable*, and unindexed.  Dictionaries are written with curly brackets, and have keys and values
  • 23. Looping statement- If we want to execute a group of statements multiple times, then we should go for a looping kind of execution. There are two types of loops available in python. They are: 1.while loop 2.for loop 1.While loop- A "While" Loop is used to repeat a specific block of code an unknown number of times, until a condition is met. 2.For loop- for loops are used when you have a block of code which you want to repeat a fixed number of times.
  • 24. Conclusion- It is manifest that Python is a robust, high-level programming language with easy-to-read code lines. Its extensive support and power have made Python a superior programming language across the globe. It has gained importance across the globe as computer giant Google has made it one of its official programming languages.