Skip to content

Latest commit

 

History

History
19 lines (14 loc) · 324 Bytes

File metadata and controls

19 lines (14 loc) · 324 Bytes
a = 'Python best'
a[a.index('t')] = 'd'

print(a)

Output: TypeError: 'str' object does not support item assignment

Tag: #string/immutable


print(sum('Lorem ipsum', ''))

Output: TypeError: sum() can't sum strings [use ''.join(seq) instead]

Tag: #string/concatenation, #built-in/sum