Python program to replace all negative numbers with zero in a list. We will learn how to do that by using a loop and using a recursive method.
ReadPython program to split the root and extension of a path by using os.path.splitext. Learn the definition of os.path.splitext with example.
ReadPython program to decrement a for loop. Learn how to do this by using range() and by using reversed() methods.
ReadPython program to truncate a datetime object and get the date from it. We will learn three ways - by using date(), using strftime and by reading the properties of datetime.
ReadPython program to create a new text file. Learn how to create a new text file by using x mode and w mode in Python
ReadPython program to convert float to integer. We can use int() or math.floor or math.ceil methods to convert float to integer in python.
ReadPython program to append text to a file. We will learn different ways to append text to a file using Python.
ReadPython numpy random choice method example to generate a random sample from a given 1-D array. We will use numpy.random.choice method.
ReadPython program to convert a tuple to set. We will learn two different examples on tuple to set conversion in python.
ReadPython program to take hexadecimal values as user inputs in python. Hexadecimal is base 16 number system.
Read