+ 1

Where did the space come from ...

I have this code: a='a' b='b' print(a,b) The output is: a b Where did the space come from and how can it be removed? Thank you

12th Jan 2020, 5:12 PM
GeoK68
GeoK68 - avatar
1 Resposta
+ 3
By default, a white space is set as seperator between two data while printing. Use a 'sep' parameter with empty string argument to avoid it. print (a,b,sep="") #Outputs ab print (a,b,sep=":") #outputs a:b
12th Jan 2020, 5:38 PM
Sarthak
Sarthak - avatar