I\'m using Beautiful Soup in Python to scrape some data from HTML files. In some cases, Beautiful Soup returns lists that contain both string and NoneType
string
NoneType
You could easily remove all NoneType objects from a list using a list comprehension:
lis = [i for i in lis if i is not None]