python

python

IntEnum in python explanation with example

Python IntEnum can be used to create enumerated constants with subclass of int. We can use this method to create enumeration based on integers in python.

Read
python

Python string upper() method explanation with example

Learn how to use Python string upper() method. upper() is used to convert each character of a string to upper case in python. This post will show you how to use upper with example.

Read
python

Python string lower() method explanation with example

Python string lower method explanation with example. lower() method is used to convert a string to lowercase. This post will show you how to use python string lower() method.

Read
python

How to convert a python string to hexadecimal value

Python program to convert a string to hexadecimal value. Hexadecimal value starts with 0x. This program will show you how to convert string to hex in python.

Read
python

How to truncate number to integer in python

Python program to truncate a number to integer. Python provides math.trunc and int() methods to truncate numbers. In this post, I will show you how to use math.trunc and int() with example.

Read
python

Python program to print a mirrored right-angle star triangle

Python program to print a mirrored right angle triangle using star or any other character. Take the height of the triangle as input and print it.

Read
python

How to create a linked list in python

Python program to create a linked list. This program will show you how to create a linked list, how to add node and print all nodes in python with example.

Read
python

Find all prime numbers in a range in python

Python program to find all prime numbers in a range. The program will take the first and the last number of the range as input from the user and print out all prime numbers in that range.

Read
python

How to check if a triangle is valid or not in python

Python program to check if a triangle is valid or not. The program will take the angles as input from the user and print out a message if it is valid or not.

Read
python

Difference between python append() and extend() methods of list

Learn the difference between append() and extend() methods of python list. Both methods are used to add items to a list. This post will show you the difference between them.

Read