Oct-16-2020, 07:17 AM
With
that's why @Griboulis example
is identical with
str.join()
you call instance method directly on the class. It expects to implicitly receive instance of the class - that will be used as separator and an iterable, whose elements will be concatenated with the use of the separatorthat's why @Griboulis example
str.join('a', 'bc') # 'a' is the instance of str and 'bc' is the iterable
is identical with
'a'.join('bc')and yield the same output.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs