Created
August 8, 2017 20:15
-
-
Save MattWoodhead/6a9d9cf1a133d327df054f0eeff09985 to your computer and use it in GitHub Desktop.
A simple print definition for reuse removing the automatic newline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Print function without the newline | |
""" | |
from functools import partial | |
echo = partial(print, end=' ') | |
echo("Hello world!") | |
echo("Hello world!") | |
echo("Hello world!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment