I am trying to get my codes to print this output.
here is my code
outputlist = []
bad_character=['! ', ',']
def is_palindrome(alist):
for element in alist:
for s in word:
if s is bad_character:
continue
my_stack.append(s.lower))
my_stack_reverse=my_stack[::-1]
if my_stack_reverse==my_stack
outputlist.append(True)
else
append(False)
if my_stack_reverse=my_stack
test_list=['Madam', 'A nut for a jar of Tuna', 'I love DSAG']
print(is_palindrome(test_list))
print(test_list)
I'm trying to have this as my output but got errors output :
[True, True, False]
['Madam', 'A nut for a jar of Tuna', 'I love DSAG']