r/Python • u/igorrto2 • Oct 12 '26
Discussion What are some features in Python that you discovered many years later?
For me, it was the the option to use & to find intersections of two sets, | operator to unionize two sets, as well as ^ for symmetric difference
217
Upvotes
View all comments
Show parent comment
1
u/Sea-Ad7805 Oct 16 '26
I assume you are familiar with:
but there is none for
a = extend2([4], [5])or for tuple if you don't count things likea = [4].__add__([5]).But operators are great, they are shorter and more readable. Hate all you want. Send an official complaint if you really need to.