I want to get all the words starting with a or A in a string printed.
But, this just prints all the elements. What should i do to solve it?
I have made the following:
string1= input("Enter a string: ")
words= string1.split()
for word in words:
if(word[0]=='a' or 'A'):
print(word)
This prints all the elements instead of just the letters starting with a or A.