Can I define both function's argument's default value and data type in python?

Viewed 6246

I want to write something like this.

1) def func_name(arg1, arg2, arg3 = 3) #this defines default value for optional argument arg3

2) def func_name(arg1, arg2, arg3: int) #and this defines data type for required argument arg3

Is there any possible method to define both of them? Something like this

def func_name(arg1, arg2, arg3 = 3: int)

1 Answers
Related