Python - File Reading and Writing Strategies
How can you modify this code to skip empty lines while reading a file line by line?
with open('data.txt') as f:
for line in f:
print(line.strip())