TYPES OF DATA TYPES
Text type
Numeric Types
Sequence Types
Mapping Type
Set Types
Boolean Type
Binary Types
NUMBERS
Int
Float
complex
TYPE CONVERSION
Converting from one form of number to other.
STRINGS
A string is a collection of characters with both integers and alphabets.
CASTING
Converting from one data type format to other.
BOOLEAN
Consists of True and False basically 1 and 0
COLLECTION DATA TYPES IN PYTHON
List
Tuple
Set
Dictionary
LIST
List is a collection which is ordered and changeable.
Allows Duplicate Members.
Square Brackets
Example:- this_is_list = [“America”,”Barcelona”,”China”]
TUPLE
Tuple is a collection which is ordered and unchangeable
Allows duplicate members.
Uses Round Brackets
Example:- this_is_tuple = (“America”,”Barcelona”,”China”)
SET
Set is a collection which is unordered and unindexed.
No duplicate members.
Uses curly brackets.
Example:- This_is_set = {“America”,”Barcelona”,”China”}
DICTIONARY
Dicationary is a collection which is unordered, changeable and indexed.
No duplicate members.
Dictionaries use curly brackets and they have keys and values.
Example:- this_is_dict = {
“city” : “Rome”,
”Country”: “Italy”
}
RANGE
Range is a built in function used in python to generate a sequence of numbers.
ARRAYS
Python does not have a built in support for Arrays.
Python Lists can be used as arrays.
SYNTAX
Set of rules that defines the combinations of symbols that considered to be correctly structured statements.
