I have a list that contains logs, and I am trying to add an empty line between specific blocks. So when I get to the end of a specific block, I can see a bit of separation, instead of looking like a continuous list.
EX:
log a:
kdsaldklsadkaslk
kasldkasldkasldkasldk
log a1:
lkpadkfaldkfdsl
klsdkfldskfsdl
So far I've tried all that I was able to find online, but I was unsuccessful. Either I am forced to add anything but an empty line (like a sequence of ----- for example), or the space added will be added to every single line (which is not what I want).
If I add in the list the empty line, like
log_list.append(" \n")
when I print the list using
print "\n".join(log_list)
all the empty lines that I have added are not printed.
But if I add any character to the append command, then it will be printed.
Is there any option that is automatically taking off the empty lines in a list, when I do the join command? Otherwise I do not understand why I cannot have an empty line in the list.
Is there another way to print out lists? I've always seen printing lists with the join command (all my objects in the list are strings).
Thanks!