AppDividend
Latest Code Tutorials
Browsing Category

Python

Whether you’re new to programming or an experienced developer, it’s easy to learn and use Python. Python is an interpreted high-level programming language for general-purpose programming.

Python Tutorials will help you to up and running with Python in no time.

How to Clear Console in Python

Clearing the interpreter console is an easy task in Python and depending on the platform you are using, there are various commands you can use. You can also clear the interpreter programmatically.Clear Console in Python To clear the…

How to Write Python inline if statement

The if-else statement in Python is logical. Python does not use the ternary operator for inline if statement as other language uses. Instead, it offers a one-line code to evaluate the first expression if the condition is true. Otherwise, it…

How to Convert Python char to int

In Python, all characters have an integer ASCII value. A char can either be represented as an ASCII value or, if the char comprises digits only, as the number it represents. The conversion from char to int is an explicit type conversion in…

How to Get Class Name in Python

A python is an object-oriented programming language, and almost everything is an object, with its properties and methods. In Python, use the type(object) function to return a type object. To access the classname of the type of the object,…

How to End Program in Python

To exit the program in Python, we can use one of the following methods.sys.exit() quit() exit()All these functions have almost the same functionality as they raise the SystemExit exception by which the Python interpreter…

What is Python __all__ and How to Use it

Python __all__ is a variable that can be set in the __init__.py file of a package. The __all__ variable is a list of strings that defines those symbols that are imported when a program does. Let's see __all__ in detail.What is Python…

What are the List Attributes in Python

Python list is a collection of arbitrary objects, ordered, dynamic, mutable, somewhat similar to an array in other programming languages but more flexible. The list has many attributes and methods that we can use.List Attributes Python…

How to Create an Empty String in Python

Python strings are sequences of Unicode characters. A character is simply a symbol. To create a string, use the characters inside a single quote('') or double-quotes("").Python empty string To create an empty string in Python,…