3 ms·
The way it's managed in JS, digging the function out of the prototype to apply it, can be done in Python as well. But unlike JS you won't normally have to, than
by ptx 5y ago
The way it's managed in JS, digging the function out of the prototype to apply it, can be done in Python as well. But unlike JS you won't normally have to, thanks to the method not being defined only on one specific type of iterable.
JS:
Array.prototype.join.call(["one", "two", "three"], "|")
Python:
str.join("|", ["one", "two", "three"])