Latest Posts From Vijaykrishna Ram

Python Lower

Python String lower() Method

Python String lower() method converts a string object into a lower case string. This is one of the builtin string functions in Python. Since strings are immutable in Python, this method only returns a copy of the original string. Syntax and Usage of Python String lower() Method Format: Here, str_copy is the lowercase string of […]

Python Print Without Newline

There are different ways through which we can print to the console without a newline. Let’s quickly go through some of these methods. 1. Using print() We can use the print() function to achieve this, by setting the end (ending character) keyword argument appropriately. By default, this is a newline character (\n). So, we must […]

Remove Duplicate Elements from List in Python

In this article, we’ll look at how we can remove duplicate elements from List in Python. There are multiple ways of approaching this problem, and we will show you some of them. Methods to Remove Duplicate Elements from List – Python 1. Using iteration To remove duplicate elements from List in Python, we can manually […]

Find String Length in Python

We can find string length in Python using the built-in len() function. Let’s look at how this function works, and also let’s try finding the length of various types of Python strings using len(). Using len() Let’s look at some simple examples to illustrate len(). This prints 20 because it is the number of characters […]

Python String find()

The Python string find() method is used to check if a string is a substring of another string. Often, when we want to check if a string contains another string, find() is very useful to solve this problem. Let us understand how we can use this, through some simple examples. Syntax of Python String Find() […]

Python – Print to File

In this article, we shall look at some of the ways to use Python to print to file. Method 1: Print To File Using Write() We can directly write to the file using the built-in function write() that we learned in our file handling tutorial. Output (Assume that output.txt is a newly created file) Method […]