Skip to content

Instantly share code, notes, and snippets.

@BurhanH
Created February 25, 2019 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BurhanH/7879c3999e33503b2d70d0a291a4481c to your computer and use it in GitHub Desktop.
Save BurhanH/7879c3999e33503b2d70d0a291a4481c to your computer and use it in GitHub Desktop.
string interpolation, Python 3.6 and above
# -*- coding: utf-8 -*-
name = 'User'
f'Hello, {name}!'
#'Hello, User!'
# most powerfull part is
a = 10
b = 4
f'Ten plus four is {a + b}'
#'Ten plus four is 14'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment