[Tutor] HELP! How do I remove the black after "s="

Chris “Kwpolska” Warrick kwpolska at gmail.com
Sat May 10 10:13:54 CEST 2014


On Sat, May 10, 2014 at 8:35 AM, 1 2 <bothenta at gmail.com> wrote:
> In the result it shows "s= 8" pls tell me how to remove the blank?
>
> s,t,n = 0,0,1
> while t <= s:
>     s,t,n = s+2,t+n,n+1
> else:
>     print('s=',s,n)

You must use something else.  For example:

    print('s={0} {1}'.format(s, n))

This will produce "s=8 5".  If you want "s=85", remove the space in
the format string.

-- 
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense


More information about the Tutor mailing list