Stripping /n in einer Readlinien für eine Pytgon -Datei
alist = [line.rstrip() for line in open('filename.txt')]
Wide-eyed Whale
alist = [line.rstrip() for line in open('filename.txt')]
with open(filename) as f:
mylist = f.read().splitlines()
#read lines no '\n'
list(open(current_dir+"_filterkeys.txt","r",encoding='utf-8').read().splitlines())