I am trying to use count to count the number of characters in two separate strings. I can get it to work for just one but how can I format it to count for two strings? I have tried using 'and' but it is not working. What I want is when the user enters inputs for name1(Anna) and name2(Andy) I want the result to be 3 counting the letter 'a' in both names.
name1 = input("What is your name? \n")
name2 = input("What is their name? \n")
lower1 = name1.lower()
lower2 = name2.lower()
a = lower1.count("a") and lower2.count("a")
print(a)