python

python

Python program to convert a hexadecimal value to decimal

Python program to convert a hexadecimal or hex value to decimal. We will learn two different ways to convert a hexadecimal number to decimal in this post.

Read
python

4 ways to find the average of 10 numbers in Python

Python program to find the average value of 10 different numbers. We will learn 4 different ways to find the average of numbers in Python.

Read
python

How to delete all files in a folder older than n days using Python

Learn how to delete all files in a folder older than n days using Python. We will learn two different ways to do this.

Read
python

Introduction to yield in Python with example

Python introduction to yield. yield keyword is used to return some value from a function in Python. Learn about yield and difference between return yield.

Read
python

Learn to get the class name in Python in 2 ways

Python program to get the class name in two different ways. We can use this method to print the class names in log files and this becomes easy to debug log files.

Read
python

How to convert a decimal value to hexadecimal in Python

Python program to convert a decimal value to hexadecimal. We will learn 4 different ways to convert a decimal value to hexadecimal like by using a separate method, by using a recursive method, by using hex() etc.

Read
python

4 ways to convert a datetime object to epoch in Python

Python program to convert a datetime object to epoch. We will learn 4 different ways to do the conversion of datetime to epoch.

Read
python

Python program to print a cross pattern using star

Learn to print a cross pattern using star or any other character in Python. It will take the height as input from the user and print the pattern for that height.

Read
python

Python in and not in operators explanation with examples

Python in and not in operators are used to check if an item is in a sequence or not. Learn how to use in and not in operators with different examples in this post.

Read
python

Python program to convert a binary to decimal

Python program to convert a binary value to decimal. Learn 4 different ways to convert binary to decimal. The program will take the binary value as input from the user and print the decimal output.

Read