print function and unwanted trailing space

Wayne Werner wayne at waynewerner.com
Wed Sep 11 07:36:11 EDT 2013


On Sat, 31 Aug 2013, candide wrote:
> # -----------------------------
> for i in range(5):
>    print(i, end=' ')   # <- The last ' ' is unwanted
> print()
> # -----------------------------

Then why not define end='' instead?

-W



More information about the Python-list mailing list