+ 1

How to overcome 'Return' outside function error?

When I type this code it shows the above mentioned error def=count_char(text, char) count=0 for c in char: Count+=1 return count Pls tell why this happens Thanks:)

29th Jul 2019, 10:40 AM
Aarya Wadhwani
Aarya Wadhwani - avatar
2 ответов
+ 1
Thank you
29th Jul 2019, 11:34 AM
Aarya Wadhwani
Aarya Wadhwani - avatar