From: Peng Yu on 18 Sep 2009 12:41 Hi, I don't want to print the space between 'a' and 'b'. Could somebody let me know how to do it? Regards, Peng $ python Python 2.5.2 (r252:60911, May 21 2008, 10:08:24) [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print "a","b" a b
From: Andreas Tawn on 18 Sep 2009 12:49 > Hi, > > I don't want to print the space between 'a' and 'b'. Could somebody > let me know how to do it? > > Regards, > Peng > > $ python > Python 2.5.2 (r252:60911, May 21 2008, 10:08:24) > [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> print "a","b" > a b print "a" + "b" Cheers, Drea
From: Donn on 18 Sep 2009 12:53 print "a"+"b" \d
From: Tobiah on 18 Sep 2009 15:34 > I don't want to print the space between 'a' and 'b'. Could somebody let me > know how to do it? >>>> print "a","b" > a b Since you are new, you should also be aware of: print "%s%s" % (a, b)
From: koranthala on 18 Sep 2009 16:16 On Sep 18, 9:49 pm, "Andreas Tawn" <andreas.t...(a)ubisoft.com> wrote: > > Hi, > > > I don't want to print the space between 'a' and 'b'. Could somebody > > let me know how to do it? > > > Regards, > > Peng > > > $ python > > Python 2.5.2 (r252:60911, May 21 2008, 10:08:24) > > [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> print "a","b" > > a b > > print "a" + "b" > > Cheers, > > Drea What if I want to print 1 to 100 in a loop without spaces in between? I think that is the OPs question.
|
Next
|
Last
Pages: 1 2 Prev: Looking for a pure Python chart drawing module Next: pygame and py2app : big package |