Summer training at Goeduhub Technologies-Jaipur
Register for Free Certified Workshop on RTU Python Lab (VI SEM):: 01-03-2020 ||  Career options for aspiring CS/ITECEEE or EIC or EEE Engineers
0 like 0 dislike
15 views
in Tutorial & Interview questions by Summer Trainee (7k 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 Summer Trainee (7k 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
0 like 0 dislike
1 answer
 Go to your Branch CSE or IT | ECE | EE, EIC or EEEMECE
 Know About Popular Colleges/Universities  List of IITsList of NITs | RTU-KOTA | Manipal University-Jaipur | JECRC University | Amity University Jaipur | BIT Mesra-Jaipur | MODY UNIVERSITY | LNMIIT-Jaipur | JK Lakshmipat | Banasthali Vidyapith | POORNIMA University
 Exams:   List of Exams After Graduation | List of Engineering Entrance Examinations (UG/PG) | JEE Main | JEE Advanced | GATE | IES | ISROList of PSUs
Placements:  List of companies | Logical Reasoning Questions | Quantitative Aptitude Questions | General English Questions | Technical-MCQ and Interview Questions
 Download Previous Year Papers For:  GATE | IES | RAJASTHAN TECHNICAL UNIVERSITY (RTU-Kota)RPSC Technical Exams | ISRO
 Online Free Training:  Artificial Intelligence(AI) & Machine Learning(ML)Python Programming | Internet of Things-IoT | OpenCV (Open Source Computer Vision Library) | LINUX | Big Data : Hadoop | 
 Goeduhub
About Us | Contact Us   Social::   |  | 
...