vendredi 20 février 2015

removing space from string in python


def digits_plus(test):

test=0
while (test<=3):

print str(test)+"+",
test = test+1


return()

digits_plus(3)


The output is: 0+ 1+ 2+ 3+


However i would like to get: 0+1+2+3+


Aucun commentaire:

Enregistrer un commentaire