I have to create a function that takes a list of integers, strings, and booleans as an input. It is then takes the strings and prints them out as one sentence. This is my function so far:
def sentenceGenerator(a):
newList = []
for string in a:
if string == str
newList.append(string)
print(newList)
And this is how I use it:
sentenceGenerator(["Mulan", "and", 5, "Aladdin", "is", True, "Quality"])
I know the if statement is not correct but I don't know how else to search.