Skip to content

Instantly share code, notes, and snippets.

@gidgid
Created February 2, 2021 12:46
Show Gist options
  • Save gidgid/4fc3d413415272204d196936b7c13edb to your computer and use it in GitHub Desktop.
Save gidgid/4fc3d413415272204d196936b7c13edb to your computer and use it in GitHub Desktop.
shows how to get the first element of a list and add it
from typing import List
def increment_first_by(values: List[int], add_me: int) -> int:
return values[0] + add_me
def test_increment_first():
assert increment_first_by([1, 2, 3], 5) == 5 + 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment