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 Calculate a Percentage in Python

There is no percentage operator in Python to calculate the percentage, but it is irrelevant to implement on your own.Percentage in Python To calculate a percentage in Python, use the division operator (/) to get the quotient from two…

How to Convert Python Int to Char

In Python, a char can either be defined as an ASCII value or, if the char carries digits only, as the number it represents. In ASCII, a particular numerical value is given to different characters and symbols for computers to store and…

How to Use While Not in Python

Iteration means executing the same block of code over and over, potentially many times. Python’s while statement is used to construct loops. A while loop in Python is used to iterate over the block of code as long as the test condition)…

How to Split List in Python

A list can be split based on the size of the chunk defined. Splitting a list into n parts returns a list of n lists containing an equal number of list elements. If the number of lists, n, does not evenly divide into the length of the list…

How to Sort String in Python

Python offers a sort() function to perform the sorting. In Python, the string is immutable means once it is created, it can't be changed. This is where things get a little complicated. The sort() function doesn’t work as it inplace tries to…

How to Print Bold Python Text

You can change your text to bold, italic, and underlined in Python. Not only can you play around with the style of your code but also change its color with the help of particular packages and modules in Python. In this tutorial, we will see…

How to Find Cube Root in Python

The cube root means a number that produces a given number when cubed. The cube root of a number is a value which when multiplied by itself thrice or three times, produces the original value. The cube root symbol is denoted by ‘3√’. In the…

How to Convert Python Int to Binary String

Are there any Python methods to convert an Integer (or Long) into a binary string? Yes, there are basically three methods you can use to convert int to binary string in Python. There are 8 bits in a byte. Bits either consist of a 0 or 1. A…

Python relative path: The Complete Guide

If you’ve worked on a Python project that has more than one file, the possibilities are you’ve had to use an import statement before.What is Relative Path A relative path points to a location that is relative to a current directory. …

Python line break: How to Print Line Break

The new line character in Python is used to mark the end of a line and the beginning of a new line. To create a string containing line breaks, you can use one of the following.Newline code \n(LF), \r\n(CR + LF).Triple quote…