0
Simple python program
def length(string): cnt=0 for i in string: cnt+=1 print(cnt) print("enter string") string=input() print(length(string)) In the above code I am getting the output as: enter string Jesha 5 None Can anyone please explain me why NOne is getting printed????
1 Odpowiedź
+ 1
Hey I got the answer I didnt include return statement at the end of function...