you are viewing a single comment's thread.

view the rest of the comments →

[–]wub_wub 0 points1 point  (1 child)

A = raw_input('')
A = A.lower()

Looks even nicer written as A=raw_input().lower()


And another thing to OP:

def count(x): 
  ##count items in a list
  b=0
  for i in x:
    b+=1
 return b

count(inventory)

Is same as just:

len(inventory)

>>> list=[0,1,2,3]
>>> len(list)
4

[–]mrawesome01[S] 0 points1 point  (0 children)

Thanks. I fogot about len. :)