Sayantan's Blog On Python Programming

bappa.sayantan@gmail.com

PYTHON TOUPLE SLICING OPERATION

PYTHON TOUPLE SLICING OPERATION INTRODUCTION Before understanding slicing operation lets look at some tuple accessing methods by using index values. PYTHON TOUPLE SLICING OPERATION : Output In the above example, we have used positive index as well as negative index. Negative index will be counted from the end of the tuple. In the above case, …

PYTHON TOUPLE SLICING OPERATION Read More »

ACCESSING NESTED TUPLE IN PYTHON

ACCESSING NESTED TUPLE IN PYTHON INTRODUCTION Nested tuple will contain complex data types like list, tuple, dictionary, sets etc. as a field. They can also contain data types like integer, string, floating, boolean etc. ORDER OF PYTHON TOUPLE Order in Python list is very important. Because tuple fields are accessed in the order they appear …

ACCESSING NESTED TUPLE IN PYTHON Read More »

ACCESSING MIXED TUPLE IN PYTHON

ACCESSING MIXED TUPLE IN PYTHON INTRODUCTION Mixed tuple will contain variable from different data types like integer, string, floating, boolean and even complex data types like list, tuple, dictionary, sets etc. as a field. ORDER OF PYTHON TOUPLE Order in Python list is very important. Because tuple fields are accessed in the order they appear …

ACCESSING MIXED TUPLE IN PYTHON Read More »

ACCESSING STRING TUPLE IN PYTHON

ACCESSING STRING TUPLE IN PYTHON INTRODUCTION String tuple will contain string variable as a field. ORDER OF PYTHON TOUPLE Order in Python list is very important. Because tuple fields are accessed in the order they appear in the tuple. ACCESSING STRING TUPLE IN PYTHON : Output TOUPLE INDEX Indexes are used to access the individual …

ACCESSING STRING TUPLE IN PYTHON Read More »

ACCESSING NUMBER TUPLE IN PYTHON

ACCESSING NUMBER TUPLE IN PYTHON INTRODUCTION Number tuple will contain any number variable as a field, either Integer or Floating point number. ORDER OF PYTHON TOUPLE Order in Python list is very important. Because tuple fields are accessed in the order they appear in the tuple. ACCESSING NUMBER TUPLE IN PYTHON : Output TOUPLE INDEX …

ACCESSING NUMBER TUPLE IN PYTHON Read More »

INTRODUCTION TO PYTHON TUPLE

INTRODUCTION TO PYTHON TUPLE INTRODUCTION TUPLE DECLARATION Tuple can be declared in various ways. INTRODUCTION TO PYTHON TUPLE : Output Usually tuple is enclosed by rounded brackets. But if we ignore brackets then also python will accept the declaration by considering the comma separated values. Any comma separated values without brackets will be considered as …

INTRODUCTION TO PYTHON TUPLE Read More »

PYTHON LIST BUILT-IN FUNCTIONS

PYTHON LIST BUILT-IN FUNCTIONS INTRODUCTIONS Python provides some useful built-in functions which can be used while working with lists. len() FUNCTION len() function returns the no of elements present in a list including duplicates. PYTHON LIST BUILT-IN FUNCTIONS : Output count() FUNCTION count() function returns the number of occurrences of an element in a given …

PYTHON LIST BUILT-IN FUNCTIONS Read More »

REMOVING DUPLICATES USING PYTHON SET

REMOVING DUPLICATES USING PYTHON SET INTRODUCTION We can remove duplicate elements by using python set() operator. REMOVING DUPLICATES IN STRING LIST We can remove duplicates using set() operator in Python. REMOVING DUPLICATES USING PYTHON SET : Output In the above example we can see that the element “Python” was appeared thrice in the list. But …

REMOVING DUPLICATES USING PYTHON SET Read More »