
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
AmitDiwan has Published 10744 Articles

AmitDiwan
373 Views
When it is required to flatten a list of tuples into a string format, the 'str' method and the 'strip' method can be used.A list can be used to store heterogeneous values (i.e data of any data type like integer, floating point, strings, and so on).A list of tuples basically ... Read More

AmitDiwan
1K+ Views
When it is required to concatenate tuples to nested tuples, the '+' operator can be used. A tuple is an immutable data type. It means, values once defined can't be changed by accessing their index elements. If we try to change the elements, it results in an error. They are ... Read More

AmitDiwan
4K+ Views
When it is required to convert a tuple to a float value, the 'join' method, 'float' method, 'str' method and generator expression can be used.Generator is a simple way of creating iterators. It automatically implements a class with '__iter__()' and '__next__()' methods and keeps track of the internal states, as ... Read More

AmitDiwan
169 Views
When it is required to find dissimilar elements in tuples, the 'set' operator and the '^' operator can be used.Python comes with a datatype known as 'set'. This 'set' contains elements that are unique only.The set is useful in performing operations such as intersection, difference, union and symmetric difference.The '^' ... Read More

AmitDiwan
242 Views
When it is required to convert a tuple to an adjacency pair dictionary, the 'dict' method, the dictionary comprehension, and slicing can be used.A dictionary stores values in the form of a (key, value) pair. The dictionary comprehension is a shorthand to iterate through the dictionary and perform operations on ... Read More

AmitDiwan
169 Views
When it is required to count the elements up to the first tuple, a simple loop, the 'isinstance' method, and the 'enumerate' method can be used.Below is a demonstration of the same −ExampleLive Demomy_tuple_1 = (7, 8, 11, 0 ,(3, 4, 3), (2, 22)) print ("The tuple is : ... Read More

AmitDiwan
2K+ Views
When it is required to check for 'None' value in a tuple, the 'all' method and the generator expression can be used.The 'all' method checks to see if all the values inside an iterable are True values. If yes, it returns True, else returns False.Below is a demonstration of the ... Read More

AmitDiwan
3K+ Views
When it is required to subtract the tuples, the 'map' method and lambda function can be used.The map function applies a given function/operation to every item in an iterable (such as list, tuple). It returns a list as the result.Anonymous function is a function which is defined without a name. ... Read More

AmitDiwan
4K+ Views
When it is required to find the area and perimeter of a circle using classes, object oriented method is used. Here, a class is defined, and attributes are defined. Functions are defined within the class that perform certain operations. An instance of the class is created, and the functions are ... Read More

AmitDiwan
2K+ Views
When it is required to append, delete, and display the elements of a list using classes, object oriented method is used. Here, a class is defined, and attributes are defined. Functions are defined within the class that perform certain operations. An instance of the class is created, and the functions ... Read More