Nikhil

Prompt for user input & read command-line arguments in Python

In this Python tutorial, we will learn how to prompt for user input and read command-line arguments in Python Programming language. This enhances the productivity and functionality, when we can directly take the input from user while executing the program. Table Of Contents Introduction User Input Method 1 : Using the Sys module Method 2 …

Prompt for user input & read command-line arguments in Python Read More »

What is __ init __.py in Python? – Give an example

When developing multiple python packages and codes, or working with multiple directories, we often come across the __ init __.py file in Python programming language. In this article, we will learn, what is __ init __.py file? Also, we will learn about Python packages and also python programming language directory structure. Table Of Contents What …

What is __ init __.py in Python? – Give an example Read More »

What is `__init__` method in Python class?

In Python OOPS programming every one must have come through this __init__() method. In this Python tutorial, we will learn What is __init__ method in Python class. Table Of Contents Introduction to __init__() method __init__ and Inheritance Summary Introduction to __init__() method In Object-Oriented Programming, we have constructors, which are used to initialize the member …

What is `__init__` method in Python class? Read More »

How do you execute a system command in Python?

In this article we will learn to execute a system command in Python Programming Language. Table Of Contents Introduction Execute a system command in Python using the OS Module Execute a system command in Python using the Subprocess Module Summary Introduction Today we will be discussing about different methods using which we can execute system/shell …

How do you execute a system command in Python? Read More »

How to use super() with `__init__()` method in Python?

In this article, we will learn to use super() with __init__() method in Python. But before lets learn about super() and __init__() method. Table Of Contents What is __init__() method ? Using ‘ super().__init__() ‘ Summary What is __init__() method ? The __init__() is a special method in python programming language which is also known …

How to use super() with `__init__()` method in Python? Read More »

What is the alternative of switch statement in Python?

In this article, we will discuss about the alternatives of switch statement in Python. Table Of Contents Introduction New Switch Statement with match and case keywords in Python Alternative of Switch Statement in Python: If-Else-Elif Alternative of Switch Statement in Python: Using dictionary Summary Introduction In other programming languages, like C++ and Java, we have …

What is the alternative of switch statement in Python? Read More »

Scroll to Top