Is there a way to globally set the print function separator?

Python python at example.invalid
Mon Oct 9 12:40:28 EDT 2017


Le 09/10/2017 à 18:22, John Black a écrit :
> I want sep="" to be the default without having to specify it every time I
> call print.  Is that possible?

 >>> oldprint = print
 >>> def print(*args,**kwargs):
...   oldprint(*args,**kwargs,sep='')
...
 >>> print(1,2,3)
123



More information about the Python-list mailing list