0
Hi guys. Can somebody explain this code, and why the answer is 7?
2 ответов
+ 3
the result of
list(map(str,x))
is a list that contains two strings = ['[0]', '[1]']
'a'.join(list(map(str,x)))
joins strings '[0]' and '[1]' together using string 'a' as separator = '[0]a[1]'
len('a'.join(list(map(str,x))))
returns the length of the string '[0]a[1]'
which is 7
0
Thanks!