It is used to represent a group of values without duplicates, where order is not important then set data Type is used. Insertion order is not preserved. Index concept is [ … ]
Category: Python
range Data Type
range Data Type represents a sequence of number. The elements present in range Data Type cannot be modified i.e., range Data Type is immutable. Form-1: range(10) this form generates numbers [ … ]
tuple data type
tuple data type is same same as list data type except that it is immutable i.e., we cannot change values. Tuple elements can be represented within parenthesis. Example: t=(10,20,30,40) type(t) [ … ]
list Data Type
list Data Type is used to represent group of values as a single entity where insertion order required to to preserve and duplicates are allowed then list data type is [ … ]
bytearray Data Type
bytearray is same as byte data type except its elements can be modified. Example 1: x=[10,20,30,40,] for i in b : print(i) 10 20 30 40 b[0]=100 for i in [ … ]
bytes Data Type
bytes data type represent a group of byte numbers just like an array. Example: x=[10,20,30,40] b=bytes(x) type(b)==>bytes print(b[0])==>10 print(b[-1])==>40 >>>for i in b : print(i) 10 20 30 40 Conclusion [ … ]
Fundamental Data Types vs Immutability
Fundamental data type are immutable i.e., once we create an object, then changes cannot be performed in that object.If we try to make changes then with those changes a new [ … ]
Type Casting and Type Conversion
Converting of one type of data into another type is called as Type Casting or Type Conversion.The inbuilt functions for type casting are : int() float() complex() bool() str() int():This [ … ]
Data Types of Python
Datatype represent the type of data present inside a variable.in Python we are not required ti specify the type explicitly. Based on value provided, the type will be assigned automatically. [ … ]
Reserved words
There are some words in Python which represents some meaning or functionality. Such words are called as reserved words. There are 33 reserved words. They are; False; None; True; and; [ … ]