Free Online Tutorials ==>> Machine Learning || Python Programming || DBMS || OOPs using C++ || DSA || Java Programming || Linux/Unix || C Programming
Go to your University || Python Lab || DSA Lab || AI & Machine Learning Lab || Linux Lab || OOPs Lab || DBMS Lab || JAVA Lab ||| Free Online Tutorials ||| 
companies for Campus Placement || Logical Reasoning || Quantitative Aptitude || General English || Technical-MCQ and Interview Questions || HR Interview Questions
0 like 0 dislike
44 views
in Tutorial & Interview questions by Goeduhub's Expert (7.8k points)

Sample string: 'thequickbrownfoxjumpsoverthelazydog'

occurrence of t word: 2

 occurrence of h word: 2 

occurrence of e word: 3

 occurrence of q word: 1 

occurrence of u word: 2 

occurrence of i word: 1 

occurrence of c word: 1 

occurrence of k word: 1 

occurrence of b word: 1

 occurrence of r word: 2 

occurrence of o word: 4

 occurrence of w word: 1

 occurrence of n word: 1 

occurrence of f word: 1

 occurrence of x word: 1 

occurrence of j word: 1 

occurrence of m word: 1 

occurrence of p word: 1 

occurrence of s word: 1 

occurrence of v word: 1 

occurrence of l word: 1 

occurrence of a word: 1 

occurrence of z word: 1 

occurrence of y word: 1 

occurrence of d word: 1 

occurrence of g word: 1

1 Answer

0 like 0 dislike
by Goeduhub's Expert (7.8k points)
 
Best answer
s=input()

f={}

for i in s:

    if i in f:

        f[i]+=1

    else:

        f[i]=1

print(f)

Related questions

0 like 0 dislike
2 answers 19 views
0 like 0 dislike
1 answer 26 views
  Realize your learning potential with courses starting at ₹ 420
 Placements:   List of companies | Logical Reasoning Questions | Quantitative Aptitude Questions | General English Questions | Technical-MCQ and Interview Questions
 Online Free Training:  MACHINE LEARNINGPython Programming | Database Management System(DBMS) | Object Oriented Programming(OOPs) using C++ | Data Structures and Algorithms(DSA) | Java Programming | Linux/Unix | C Programming
Exams: List of Exams After Graduation | List of Engineering Entrance Examinations (UG/PG) | JEE Main | JEE Advanced | GATE | IES | ISROList of PSUs
 Download Previous Year Papers For:  GATE | IES | RAJASTHAN TECHNICAL UNIVERSITY (RTU-Kota)RPSC Technical Exams | ISRO
 Goeduhub
About Us | Contact Us   Social::   |  | 
...