Number of Occurences of a Character Get link Facebook X Pinterest Email Other Apps Number of Occurences of a CharacterQUESTION DESCRIPTIONWrite a program find the number of occurrences of a character in a given string.Input:First line is the string, sSecond line is the character, cOutput:An integer, i.e. the number of occurrences of c in s. a=input()b=input()print(a.count(b)) Comments
Comments
Post a Comment