Concatening string and integer

Andy Lester andy at
Thu Apr 27 09:55:10 EDT 2000

> I want to concatenate a string containing both strings and integers like:
> strTemp = 'I make test number: ' + iMyNumber + ' once again'
> It doesn't work, how should I do this?

strTemp = 'I make test number: %d once again' % iMyNumber


Andy Lester, andy at,
    "Inflammable material is planted in my head
     It's a suspect device that's left two thousand dead."
    "Hey, is this the new Green Day?"

More information about the Python-list mailing list