entremanure entremanure - 4 months ago 35
Python Question

Python: Adding characters to strings error

I am creating a pseudo random encryption program, and IDLE returns and error when I try to expand my seed value. The code goes like this.

for i in str(addon):
seed = str(seed)
seed = int(seed)

When I run it, this happens.

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

Any ideas on how I can add characters onto the end of a string?


Use + instead of append. Append is for list objects.

seed += str(i)