https://researchdatapod.com/how-to-solve-python-attributeerror-list-object-has-no-attribute-endswith/
How to Solve Python AttributeError: 'list' object has no attribute 'endswith'