[issue40035] Filtration of the .txt file

Hamed Elahi report at bugs.python.org
Sat Mar 21 13:34:59 EDT 2020


Hamed Elahi <hamed.elahi11 at gmail.com> added the comment:

Hello,

I saw a problem when this line of code is used in Python 3:

settings = [line for line in settings if (line!='' and line[0] != '#')]

Before updating windows, this line of code filtered the texts from the beginning of .txt file, so only the first lines remained after filtration, but now, after windows update, it filters the texts so that the last rows of .txt file will remain after filtration.
Shouldn't a line of code acts the same in different updates?

----------
title: ilteration of the .txt file -> Filtration of the .txt file

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40035>
_______________________________________


More information about the Python-bugs-list mailing list