Relative Content

Tag Archive for python-3.xstringfilter

Why does the str() not work on filter objects?

besthand = “AAAAJ” besthand = str(filter(“J”.__ne__, besthand)) why is the type of besthand still a filter object? I’ve seen that you can use besthand = “”.join(besthand) but I don’t understand fully why str() doesn’t work. Is it because filter objects are iterable? P.S. I know it’s close to being a duplicate, but I couldn’t find […]