Question #882

What is the output of the code snippet below?
def my_function(an_int: int):
    return an_int * 2

print(my_function("Python"))

Even though the function parameter type is annotated (the function is expecting to receive an int ), it doesn't mean that the argument has to be of this type. (python.org/dev/peps/pep-0484)


Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵


Similar questions: