Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 349 Bytes

File metadata and controls

27 lines (18 loc) · 349 Bytes

AttributeError: 'str' object has no attribute 'append'

Reproduce

text = "hello"
text.append("world")

Error Message

AttributeError: 'str' object has no attribute 'append'

Fix

text = "hello"
text = text + "world"

print(text)

Reflection

I treated a string like a list and tried to use append.