Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

shopping list 3 error

    posistion = abs(int(posistion))
  except ValueError:
    position = None
  if posistion is not None:
    shopping_list.insert(posistion-1,item)
  else: 
    shopping_list.append(item)
    show_list()

workspaces is saying there is an issue with the line 'shopping_list.insert(posistion-1,item) ' because unsupported operand type for -: 'str and int can someone please help me figure this out

3 Answers

Show all listing and use markdown to format your code on the page.

here it is

If this is full listing, then problem may be in using two different variables: position and posiStion.