Thanks Peter, That just fixes my problem. : )
Kann On Tue, Apr 19, 2011 at 5:29 PM, Peter Otten <__pete...@web.de> wrote: > Kann Vearasilp wrote: > >> I tried concatenating string variables with multiple strings and have the >> file handle write the statement into a file. I don't know why I always get >> the type error: must be string or read-only character buffer, not seq >> error. I tried casting the whole new concatenated string using str(), but >> was not successful as well. Do you have any clue why this happen? > >> 52 str(statement) >> 53 insert.write(statement) > > Line 52 doesn't do what you think it does -- it converts statement to a > string and then discards the result. > > Try > > statement = str(statement) > insert.write(statement) > > or > > insert.write(str(statement)) > > instead. > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor