craigmrock
Sep 28, 2018 - 18:00
Trying to return True if there are duplicate items in a list.
Not working with numbers, and want to allow the user to make a list as long as they want...suggestions?
```
user = input("What's on your list??: ")
def has_consecutive():
items = user.split() #trying to split list into items to compare
if (items[0] == items[+1]): #trying to compare one item to the next to find duplicates
return True #return true if duplicates are found
else:
return False #return False if no duplicates are found
has_consecutive()```