Function Syntax Error

Hi all,
I seem to be having some trouble with a python project on More Frequent Item

Here is my code:

#Write your function here
def more_frequent_item(1st, item1, item2):
  if lst.count(item1) >= lst.count(item2):
  	return item1
	else:
  	return item2
#Uncomment the line below when your function is done
print(more_frequent_item([2, 3, 3, 2, 3, 2, 3, 2, 3], 2, 3))

It seems to be returning a syntax error, would anyone care to help?

It appears that the first parameter of your function starts with a number '1' instead of a lowercase 'l' as in lower. It may just be how it is showing up in your post, but that would cause a syntax error since variable names cannot start with a number. You also have an indentation error with the placement of else: :wink:
Note: You could do away with the else entirely.

1 Like