python

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 the 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 angled 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
python

Python program to append a single line to the end of a file

Python program to append single line to the end of a file. We will learn how to open a file to append in different ways and how to append a line to the end in python.

Read
python

Python program to find the sum of all numbers of file

2 different Python programs to find the sum of all numbers found in a file. You will learn how to read the contents of a file and how to check all contents in a file in Python.

Read