DEV Community

Discussion on: 5 Python Tricks in one line. Beginner vs Professional

Collapse
 
vadimkolobanov profile image
Vadim Kolobanov

It's very simple) You are trying to change the values of the set. You forget that the values in it are immutable, so the lower case will not work. In this situation, it is necessary to bring to one register earlier

Collapse
 
sentayehu profile image
Sent

Right, but set is applied right after we lower the case for all items.
demo: online-python.com/isJQnjgrZf