I came to a notation in python where I iterate len(nums) like this: where
res = []
res += nums[i]
and I get the TypeError: 'int' object is not iterable
error message.
However, If I do,
res += nums[i],
the expression passes. I tried to look Python doc, but couldn't find the reference. Can you please help me locate it or explain why I need a comma for slice iteration additions?