- Trending Categories
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
Hafeezul Kareem has Published 344 Articles
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
Hafeezul Kareem
1K+ Views
In this tutorial, we are going to learn how to take multiple inputs from the user in Python.The data entered by the user will be in the string format. So, we can use the split() method to divide the user entered data.Let's take the multiple strings from the user.Example# taking ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
Hafeezul Kareem
3K+ Views
In this tutorial, we are going to learn how to take input from the console in Python.The interactive shell in Python is treated as a console. We can take the user entered data the console using input() function.Example# taking input from the user a = input() # printing the data ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
Hafeezul Kareem
6K+ Views
In this tutorial, we are going to learn how to take matric input in Python from the user. We can take input from the user in two different ways. Let's see two of them.Method 1Taking all numbers of the matric one by one from the user. See the code below.Example# ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
Hafeezul Kareem
502 Views
In this tutorial, we are going to learn how to swap two variables in different languages. Swapping means interchanging the values of two variables. Let's see an example.Inputa = 3 b = 5Outputa = 5 b = 3Let's see one by one.PythonWe can swap the variable with one line of ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
Hafeezul Kareem
3K+ Views
In this tutorial, we are going to write a program that adds all numbers from the list. List may contain numbers in string or integer format. See the example.Inputrandom_list = [1, '10', 'tutorialspoint', '2020', 'tutorialspoint@2020', 2020]Output4051Follow the below steps to write the program.Initialize the list.3Initialize a variable total with 0.Iterate ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
Hafeezul Kareem
266 Views
In this tutorial, we are going to see some best practices for structuring the Python programs. Let's see one by oneUse a tab for indentationUsing a tab for indentation in the code make code more readable instead of using random spaces for multiple functions and methods. You can set the ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
Hafeezul Kareem
4K+ Views
In this tutorial, we are going to learn about the struct module. Let's dive into the tutorial.The module struct is used to convert the native data types of Python into string of bytes and vice versa. We don't have to install it. It's a built-in module available in Python3.The struct ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
Hafeezul Kareem
317 Views
In this tutorial, we are going to learn about the string.whitespace.The string whitespace is pre-defined in the string module of Python3. If contains space, tab, linefeed, return, formfeed, and vertical tab.Example Live Demo# importing the string module import string # printing a string print("Hello") # whitespace printing print(string.whitespace) # printing a ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
Hafeezul Kareem
3K+ Views
In this tutorial, we are going to learn about the string.punctuation string.The string punctuation is pre-defined in the string module of Python3. It contains all the characters as a string. We can use it anywhere in the program.Example Live Demo# importing the string module import string # printing the punctuation print(string.punctuation)OutputIf ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
Hafeezul Kareem
90 Views
In this tutorial, we are going to learn about the string.octdigits string.The string octdigits is pre-defined in the string module of the Python3. We can use the octal digits whenever we want in the program by simply accessing it from the string module.Example Live Demo# importing the string module import string ... Read More