Which of the following is a correct Python function definition using type annotations?
Options
- A. def fun(float *a, int b):
- B. def fun(a: float, b: str) -> int:
- C. int fun(float a, str b):
- D. More than one of the above
- E. None of the above
Quiz Practice:
B. def fun(a: float, b: str) -> int: