Python19th June2024 06
Python19th June2024 06
e.g. s1 = 'Rohit'
s2="Rohit"
str Data Type Note: By using single quotes or double quotes we cannot represent multi line string
literals.
We can also use triple quotes to use single quote or double quote in our String.
''' This is "character'''
In python the following data types are considered as Fundamental Data Type
int
float
complex
bool
str
In python, we can represent char values also by using str type and explicitly char type is not available.
About Python Data
Type
Long Data type is available in python2 but not available in python3. In Python3 long values also we can
represent by using int type only.
TYPE CASTING IN PYTHON
We can convert one type of value to another type. This conversion is called Typecasting or
Type conversion.
The following are various inbuilt function for type casting in python:
Type casting int()
float()
complex()
bool()
str()