Skip to content

Instantly share code, notes, and snippets.

@NirantK
Created April 16, 2018 04:38
Show Gist options
  • Save NirantK/9d667034ef7feac484c21528251decbb to your computer and use it in GitHub Desktop.
Save NirantK/9d667034ef7feac484c21528251decbb to your computer and use it in GitHub Desktop.
_fstring = f'Total: {one + two}' # Go f-string!
_format = 'Total: {}'.format(one + two)
_percent = 'Total: %s' % (one + two)
_concatenation = 'Total: ' + str(one + two)
assert _fstring == _format == _percent == _concatenation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment