Loading...

Category: Python

set DataType

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 [ … ]

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 [ … ]

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; [ … ]