few lines need to recheck...
nothing is wrong with
if key in inventory.items():
is always false, so your code will never execute the print "found",value,"similar items"
statement.nothing is wrong with
elif message3 in key:
but i prefer elif message3 == key:
depend on how we view the code
swallow osama bin laden