
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
9K+ Views
When it is required to convert a string into a tuple, the 'map' method, the 'tuple' method, the 'int' method, and the 'split' method 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.The ... Read More

AmitDiwan
5K+ Views
When it is required to add a dictionary to a tuple, the 'list' method, the 'append', and the 'tuple' 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).The 'append' method adds elements to ... Read More

AmitDiwan
203 Views
When it is required to chunk the tuples to 'N' values, list comprehension is used.The list comprehension is a shorthand to iterate through the list and perform operations on it.Below is a demonstration of the same −ExampleLive Demomy_tuple_1 = (87, 90, 31, 85, 34, 56, 12, 5) print("The first ... Read More

AmitDiwan
213 Views
When it is required to access the front and rear elements of a Python tuple, the access brackets 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 ... Read More

AmitDiwan
3K+ Views
When it is required to check if one tuple is a subset of the other, the 'issubset' method is used.The 'issubset' method returns True if all the elements of the set are present in another set, wherein the other set would be passed as an argument to the method.Otherwise, this ... Read More

AmitDiwan
2K+ Views
When it is required to perform tuple multiplication, the 'zip' method and the generator expression can be used.The zip method takes iterables, aggregates them into a tuple, and returns it as the result.Generator is a simple way of creating iterators. It automatically implements a class with '__iter__()' and '__next__()' methods ... Read More

AmitDiwan
3K+ Views
When it is required to check if an element is present in the tuple or not, a simple loop 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 ... Read More

AmitDiwan
209 Views
When it is required to create 'N' element incremental tuples, generator expression and 'tuple' method can be used.Below is a demonstration of the same −ExampleLive DemoN = 3 print("The value of 'N' has been initialized") print("The number of times it has to be repeated is : ") print(N) my_result ... Read More

AmitDiwan
177 Views
When it is required to create a tuple from a string and a list, the tuple 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).Below is a demonstration of the same −ExampleLive Demomy_list_1 ... Read More

AmitDiwan
237 Views
When it is required to filter the tuples by the 'K'th element from a list, list comprehension and 'in' operators 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 tuple basically contains ... Read More