Tag: blank
Python: Check if string is empty or blank or contain spaces only
In this article we will discuss different ways to check if a given string is either empty or contains only spaces. Check if a string is empty using len() len() function in python accepts a sequence as an argument and returns the number of elements in that sequence. So, if we pass a string as …
Python: Check if string is empty or blank or contain spaces onlyRead More
Write to csv file without blank line in Python
In this article, we will learn how to write to a csv file without blank lines in Python. Table Of Contents Introduction to Problem Solution Summary Introduction to Problem In Python, the writer() function of csv module controls the line endings. By default it writes the rn into the file directly. Therefore, in Python3 we …