Skip to content

Instantly share code, notes, and snippets.

@katronai
Last active March 3, 2020 21:17
Show Gist options
  • Save katronai/25c62db85ad7db178bdb7adb1beeb87d to your computer and use it in GitHub Desktop.
Save katronai/25c62db85ad7db178bdb7adb1beeb87d to your computer and use it in GitHub Desktop.
String formatting and operations in Python 3.
# Print without line break
print('*', end='')
# Print without spaces between arguments
print('a', 'b', 'c', sep='')
# Flush the output in case of buffering problems
print('*', end='', flush=True)
# String formatting: https://docs.python.org/3/library/string.html#formatstrings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment