string concatenation

Ajay abra9823 at mail.usyd.edu.au
Mon Jun 28 00:24:31 EDT 2004


hi!

i am going through a for loop and want to add the strings together
i am doing this currently

for name in contextForm.keys():
    context += "Input: " + name + " value: " + contextForm[name].value +
"<BR>"

context is meant to hold all the form values in the paper.
however the code above doesn't work

being new to Python, i dont know whether you can do +=

can you?

cheers
--
Ajay Brar,
CS Honours 2004
Smart Internet Technology Research Group





----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




More information about the Python-list mailing list