basic.count
Counts number of occurences of a string within another string.
Syntax
count(string.expression1,string.expression2)
Description
returns the number of occurrences of 'string.expression2' within 'string.expression1'.
Example
sentence = 'sam is home alone'
print count(sentence,' ')
This displays the number of spaces in the string held in the variable
'sentence', which is equal to 3.
See Also
User Comments
What do you think?
Share your experience or ask a question by using the form below.
Login to leave your comments.
