Python Programming - Data Types - Discussion

Discussion Forum : Data Types - General Questions (Q.No. 65)
65.
What is the output of the following code snippet?
my_string = "Hello, World!"
result = my_string.count("l")
print(result)
1
2
3
4
Answer: Option
Explanation:
The count() method returns the number of occurrences of the specified substring in the string.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.