trying to figure out how to write an if loop to check for a string.
There are many lines in the file, and one of them is an empty line to separate from other operators (and not ""; this is a carriage return followed by another carriage return, I think)
new statement asdasdasd asdasdasdasd new statement asdasdasdasd asdasdasdasd
Since I am using a file input module, is there a way to check if a line is empty?
Using this code, it seems to work, thanks everyone!
for line in x: if line == '\n': print "found an end of line" x.close()
python
user1006198 Oct 25 2018-11-22T00: 00Z
source share