0
In python while defyning a function is it not necessary to indicate argument type ,like int,str etc., That need to be passed
5 Antworten
+ 3
Defining a functions or methods argument type in Python is not required. However, it is possible to apply an argument type hint to a function or method in newer versions (3.5 and newer) of Python.
def func(my_var: str):
....
....
https://docs.python.org/3/library/typing.html
+ 1
We can directly pass the element,no need to define it's type
0
I am asking about indicating parameter type
Ex: Def ght(int word)
print(word)
Is it applicable