- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Malhar Lathkar has Published 50 Articles
Malhar Lathkar
7K+ Views
Easiest way is to employ two nested for loops. Outer loop fetches each tuple and inner loop traverses each item from the tuple. Inner print() function end=’ ‘ to print all items in a tuple in one line. Another print() introduces new line after each tuple.ExampleL=[(1, 2, 3), (4, 5, ... Read More
Malhar Lathkar
19K+ Views
Reserved words (also called keywords) are defined with predefined meaning and syntax in the language. These keywords have to be used to develop programming instructions. Reserved words can’t be used as identifiers for other programming elements like name of variable, function etc.Following is the list of reserved keywords in Python ... Read More
Malhar Lathkar
2K+ Views
List is an ordered sequence of elements. Individual element in list is accessed using index starting with 0 and goes up to length-1. If index goes beyond this range, IndexError exception is encountered.In following example, an infinite loop is used to pop one element at a time. As loop tries ... Read More
Malhar Lathkar
8K+ Views
Given below is a nested directory objectD1={1: {2: {3: 4, 5: 6}, 3: {4: 5, 6: 7}}, 2: {3: {4: 5}, 4: {6: 7}}}ExampleFollowing recursive function is called repetitively if the value component of each item in directory is a directory itself.def iterdict(d): for k, v in d.items(): ... Read More
Malhar Lathkar
685 Views
Many a times it is required to treat more than one statements in a program as a block. Different programming languages use different techniques to define scope and extent of block of statements in constructs like class, function, conditional and loop. In C and C++ for example, statements inside curly ... Read More
Malhar Lathkar
548 Views
You can import any built-in module while writing Python script using TutorialsPoint's online IDE. For example you can import time, sys, os, re modules. However, the modules that are not bundled with the distribution - the one which needs to be installed using package managers like pip or conda - ... Read More
Malhar Lathkar
432 Views
List and Tuple are called as sequence data types of Python. Objects of both types are comma separated collection of items not necessarily of same type. However, main difference between list and tuple is that list object is mutable whereas tuple object is immutable. Immutable object can not be modified ... Read More
To Continue Learning Please Login
Login with Google