I am surprised that people use a set for this "All different" exercice
Return len(set(elements)==1) is a short and readable code, but not efficient.
Imagine the work necessary to build the set for [1, 2, 3, 'A', 5, 5, 6, 'A', 'A', 'Azerty'], which obviouly, will definitively NOT be of length 1.
while the test 1==2 makes the choice...
Created at: 2018/07/25 21:02; Updated at: 2018/07/26 05:40