Skip to content

Instantly share code, notes, and snippets.

@ssoto
Last active June 6, 2018 15:28
Show Gist options
  • Save ssoto/6868795bb672da72598969735c090f37 to your computer and use it in GitHub Desktop.
Save ssoto/6868795bb672da72598969735c090f37 to your computer and use it in GitHub Desktop.
Python typing function exampel
def foo_function(a: int, b: int) -> int:
return a + b
# First ussage example
result_a = foo_function(4, 10)
type(result_a)
>>> int
print(result_a)
>>> 14
# Second ussage example
result_b = foo_function('a', 'b')
type(result_b)
>>> str
print(result_b)
'ab'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment