Https://www.codecademy.com/paths/computer-science/tracks/cspath-flow-data-iteration/modules/dspath-python-loops/lessons/python-functions-loops-cc/exercises/reversed

https://www.codecademy.com/paths/computer-science/tracks/cspath-flow-data-iteration/modules/dspath-python-loops/lessons/python-functions-loops-cc/exercises/reversed

Hello there , i’m still newbie to Coding.
In this Python Loop Task :
#Write your function here
def reversed_list(lst1, lst2):
g =
for i in range(len(lst1)):
if lst1[i]==lst2[i-1]:
return ‘True’
else:
return ‘False’

#Uncomment the lines below when your function is done
print(reversed_list([1, 2, 3], [3, 2, 1]))
print(reversed_list([1, 5, 3], [3, 2, 1]))

I got True twice, but the system didn’t accept it and tells me it should be “True” , is it a bug or there is something wrong ?

Hello! I think the reason is that you are returning a string containing the word "True", but the lesson wants you to return the boolean type True:

some_var = "True"#string 
other_var = True#bool

I hope this helps!

1 Like