Skip to content

Instantly share code, notes, and snippets.

@ustropo
Created July 29, 2022 15:34
Show Gist options
  • Save ustropo/e34294c6feaf5ab2ab9d95bb86e47171 to your computer and use it in GitHub Desktop.
Save ustropo/e34294c6feaf5ab2ab9d95bb86e47171 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