I'm trying to use count function in python but I'm not sure can I use count in def function look likes below code?
def something():
....
print(something().count('C'))
I've try it but it's not working
I'm trying to use count function in python but I'm not sure can I use count in def function look likes below code?
def something():
....
print(something().count('C'))
I've try it but it's not working
make something return a string, then use count
def something():
return "Country"
print(something().count('C'))