This is nothing to do with Geany, its a question about the Python library, and, even if someone here might be able to help you, you would be better to learn to lookup or ask in the right place.
https://docs.python.org/3/library/stdtypes.html?highlight=strip#str.strip