Concatening string and integer

Andy Lester andy at petdance.com
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

xoxo,
Andy

--
Andy Lester, andy at petdance.com, http://www.petdance.com
    "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