0
why this is not working? can anyone please tell me where i am making mistak This is not giving any output
def count(word,x): count =0 for i in word: if i == x: count += 1 return count count('tarunyadav','a')
2 Answers
+ 1
You need to print the value that was returned by count() function
print( count( 'tarunyadav', 'a' ) )
+ 1
thankyou