Aug-25-2019, 09:33 AM
List1 =[2,3,4,9,9,5,1] def checkList(List1): for i in range(len(List1 - 1)): if List1[i] == 9 and List1[i+1] == 9: return True return falsei want to check if the number 9 comes b4 any other number in the list but my problem is the code does not return true or false