count()

http://www.adilwaseem.com/

Introduction
The function count the string character in constant variable and return with the statement. 

Syntax
count()

Parameters
String & Number

Examples
The method return with:
 x="Python Lake"
if x.count(str(10)):
    print("yes, the character exceed the permitted limit")
else:
    print("okay")
 
>>> 
okay
>>> 

count(str)
Here in this code, two variable are created and tested and print command through if statement to subject to these variable which produced output else statements.
>>> a_variable="Python"
>>> b_variable="Lake"
>>> if a_variable.count(str())==b_variable.count(str()):
            print("Both names has same characters")
    else:
            print("Name does not match") 
>>>
Name does not match
>>> 

Comments