Minor Ones

1.

The join() method is a string operation instead of a list operation, though it might seem counter-intuitive at first usage.

Explanation

If join() is a method on a string, then it can operate on any iterable (list, tuple, iterators). If it were a method on a list, it’d have to be implemented separately by every type. Also, it doesn’t make much sense to put a string-specific method on a generic list object API.


Get hands-on with 1400+ tech skills courses.