python

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
python

Python program to check if a set contains an element or not

Python program to check if a set contains an element or not. We can use in or not in to check if an item is in a set or not in Python. This post will show you how to do that with examples.

Read
python

Python program to read inputs within an interval of time

Python program to read inputs within an interval of time. We will use Timer class of the threading module of Python to take inputs in a time interval.

Read
python

How to print the ASCII values all characters in Python

Python program to print the ascii values of all characters. Learn to print ASCII values of all lowercase and uppercase characters using a for loop in Python.

Read
python

Python program to print a box pattern with plus at the center

Python program to print a box pattern with plus at the center. We will use numbers and other characters to print the box with a different character to print the plus.

Read
python

How to find the exponential value for a number in Python

Python program to find the exponential value of a number. We will learn 4 different ways to find the exponential in Python with examples.

Read
python

Python program to read the content of a file to a list

Python program to read the content of a file to a list. The file holds comma-separated strings and the program will read the strings and put them in a list.

Read