0

What does Arrow means in below statement

Hai guys can you tell me how it works "def method (self,s:str)->lost[str]:"

17th Feb 2021, 4:11 PM
P.B.V.Lalith Kumar
P.B.V.Lalith Kumar - avatar
2 Respuestas
+ 1
It's a type hint It does nothing to the code itself But it means the function should return that type But there will not be any type check! It's just like the __doc__ string
17th Feb 2021, 7:29 PM
Angelo
Angelo - avatar
0
Can you give me any example program
18th Feb 2021, 3:03 AM
P.B.V.Lalith Kumar
P.B.V.Lalith Kumar - avatar