Message402658
Hi,
I tried addition and in-place addition on a list.
>>> l = ['a', 'b', 'c']
>>> l = l + 'de' (raises an error)
>>> l += 'de'
>>> print(l)
['a', 'b' , 'c', 'd', 'e']
I want to ask why the behaviour of both these are different?? If it is done intentionally, then it should be there in the documentation but I am not able to find any reference. |
|
Date |
User |
Action |
Args |
2021-09-26 12:13:59 | devkapilbansal | set | recipients:
+ devkapilbansal |
2021-09-26 12:13:59 | devkapilbansal | set | messageid: <1632658439.55.0.347636093536.issue45293@roundup.psfhosted.org> |
2021-09-26 12:13:59 | devkapilbansal | link | issue45293 messages |
2021-09-26 12:13:59 | devkapilbansal | create | |
|