Learn how to use map in python with an iterable like list or tuple. map takes one function and applies it on each element of the iterable. It returns the modified iterable.
ReadPython program to accept a sequence of numbers. In this post, we will write one python program that takes one sequence of numbers from the user and prints out the average value.
ReadPython program to do inplace replacement of strings in a file. Read the file line by line and replace one specific string in the lines of the file.
ReadPython program to generate secure random string of length n. Learn random.choice and secrets.choice methods and how these methods works.
ReadLearn how to print spaces or blank spaces in python. We will learn two different ways to print spaces in python - by using print() and using a variable.
ReadThis program will show you how to find all indices of a character in a user provided string. We will take both the string and character from the user and print out all indices of that character.
ReadLearn how to remove https from a url in python. We are discussing two different ways in this post. By using the replace() method and by using regex or regular expression.
ReadHow to find the last occurrence of a character in a python string. We will learn two different ways to do that by using rfind() and rindex() method.
ReadLearn to replace date and time of a python datetime object. This example will show you how to replace year, month, day, hour, minute, second, microsecond and time zone of a datetime object in python.
ReadLearn how to pretty print JSON file in Python. Read JSON and pretty print and write JSON data as pretty print to file.
Read