Created
February 2, 2021 12:46
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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