Create a string by concatenating a character and an integer.
Concatenate strings in Python.
Date Created:Sunday March 11th, 2007 11:21 AM
Date Modified:Saturday August 02nd, 2008 03:55 PM
import sys i = 1; for x in ('asdfghjkl'): i += 1 var = "%c%d" % (x, i) sys.stdout.write("%s = %c + %d\n" % (var, x, i))
Download: count.py 129 B
Please login or Click Here to register for downloads
Concatenating by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com