Sail E0 Webinar
Question
What is the output of the following?print("xyyzxyzxzxyy".count('xyy', 2, 11))
Options:
A .  2
B .  0
C .  1
D .  Error
Answer: Option B


Counts the number of times the sub-string 'xyy' is present in the given string, starting from position 2 and ending at position 11.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers