Datatypes in Python
Datatypes in Python
DATATYPES IN PYTHON
By,
Mrs.B.VIJAYALAKSHMI,
Assistant Professor,
Department Of Computer Science.
WHAT IS DATATYPE???
• Value :
• Data type:
Every value in Python has a data type.
• There are three types of sequence data type available in Python, they are
1. Strings
2. Lists
3. Tuples
STRINGS
• A String in Python consists of a series or sequence of characters.
Single quotes(' ') E.g., 'This a string in single quotes' ,
Double quotes(" ") E.g., "'This a string in double quotes'" ,
Triple quotes(""" """)E.g., """This is a paragraph. It is made up of multiple lines
and sentences."""
• Individual character in a string is accessed using a subscript(index).
• Strings are Immutable i.e the contents of the string cannot be changed after it
is created.
LISTS
BOOLEAN :
• The boolean data type is either True or False.
• In Python, boolean variables are defined by the True and False
keywords.
• The keywords True and False must have an Upper Case first letter.
THANK YOU!!!