I want to get the no. of same string in a list
list = ['jack','jeen','jeen']
number_of_jeen = getnumber('jeen',list)
if any(string_var in s for s in list):
print("This user exits !")
There's a built-in method
count that does this.
number_of_jeen = list.count('jeen')