Skip to content

Instantly share code, notes, and snippets.

@ustropo
Created July 29, 2022 15:35
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 ustropo/a55ae5c03c961024cbf34921272945ba to your computer and use it in GitHub Desktop.
Save ustropo/a55ae5c03c961024cbf34921272945ba to your computer and use it in GitHub Desktop.
data = {'age': 10, 'name': 'John'}
arr = [0, 1, 2, 3, 4, 5]
print(f"The 1st element is {arr[0]}")
## 'The 1st element is 0'
print(f"Hi, {data['name']}! You'll be 18 in {18 - data['age']:02d} years")
## 'Hi, John! You'll be 18 in 08 years'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment