Skip to content

Instantly share code, notes, and snippets.

@yzdann
Created August 20, 2019 09:25
Show Gist options
  • Save yzdann/6fb713889711b70503b5b6670428dd26 to your computer and use it in GitHub Desktop.
Save yzdann/6fb713889711b70503b5b6670428dd26 to your computer and use it in GitHub Desktop.

print function

# unpack list with space
print(*['jdoe is', 42, 'years old'])

# seprator
print('node', 'child', 'child', sep=' -> ')

# prevent line break
print('The second sentence', end='. ')

# Note: Don’t try using print() for writing binary data as it’s only well suited for text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment