I mistakenly input a command in Python as:
completed_list = []
completed_list += 'bob'
Which returns:
['b', 'o', 'b']
Why does this happen?
Besides, is there any difference between += and append in this scenario? I mean between these:
completed_list.append('bob')
completed_list += ['bob']
[].append('string')and[].append(['string'])?[] + list('string'), second one is equivalent to[] + ['string'])