Report Bug

QusGiven a string x="hello" What is the output of x.count('l')? Qusएक स्ट्रिंग x = "hello " को देखते हुए x.count ('1') का आउटपुट क्या है?


A. 2
B. 1
C. 0
D. none


Solution
A. 2



Explanation

count() function is used to count the frequency of particular character or substring in a given string.

hear we count the frequency of 'l' in "hello" word which is 2 so 2 is the correct answer

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz