python

python

Python program to read all numbers of File

Python program to read all numbers from a file. Learn how to read all the numbers of a file in Python and how to find the sum of the numbers of the file with examples.

Read
python

How to compare one string with an integer value in python

Python program to compare string with integer or float. This program will show you how to compare any string value with an integer or float value using type casting in Python.

Read
python

Example of python operator module lt

Python operator module method lt is used to find less than value. In this post, we will learn how to use lt with example. lt can be used in place of <

Read
python

How to get all sublists of a list in Python

Python program to get all sublists of a list in Python. We will learn two different ways to get the sublists of a list in Python with examples for each. The program takes one list as input and prints all sublists as output.

Read
python

Python program to remove the first n characters from a string

python program to remove the first n characters from a string. We will solve it by using slicing or by using lstrip. The program will take one string and remove the first n characters.

Read
python

How to use rjust() method in python to right justified a string

Python rjust method explanation with example. You will learn how to use rjust method to right justified a string with or without any fill character.

Read
python

How to remove the last n characters of a string in python

Python program to remove the last n characters of a string. We will learn two different ways to remove the last n string characters in python.

Read
python

pass statement in Python explanation with example

pass statement in python is a null statement. pass is not ignored by the interpreter but we can use it in place of code. This post will show you how to use pass with example.

Read
python

Use python bin() function to convert integer to binary

Python provides bin function to convert integer to binary. In this post, we will learn how to python bin with exaple.

Read
python

Python program to convert string to date using datetime module

Learn how we can use datetime module in python to convert a string to date. We will also learn how to parse date to different local using datetime strptime function.

Read