John McMonagle <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: >> ' '.join([`x x` for x in range(1, 6)]) >> >> anyone can tell me what im doing wrong? >> -- >> http://mail.python.org/mailman/listinfo/python-list >> > > > ' '.join(['%s %s' % (str(x), str(x)) for x in range(1,6)]) > > or > > ' '.join([str(x)+' '+str(x) for x in range(1,6)]) > > > outputs.... > > '1 1 2 2 3 3 4 4 5 5' > > > Is that what you were after ?
Or: ' '.join(str(i//2) for i in xrange(2, 13)) ? -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list