I searched a little about this. This is probably a problem with the difference between Python 2 and Python 3. The lower
is one of the deprecated string functions in Python 2. Instead, the one defined as String Methods is recommended. In Python 3, the lower
is removed from the string library. So in Python 3, the code from string import lower
don’t work and we need to use str.lower()
as you’ve suggested.
3 Likes