Well guys here is my code, i know its incomplete and there is a never ending loop but my problem is that from time to time i get error ( list index out of range) why ? ![:(]()

import random lists=[[150, 9, 'drop'], [35,13,"cage"],[200,153,"lust"],[160,50,"google"],[60,15,"gun"],[45,68,"razor"],[60,27,"armor"] ] x=random.sample(lists, 3) theitems=[] for i in range(len(x)): theitems.append(x[i][2]) print theitems tw=0 tv=0 while True: epilogi=raw_input("choose") for i in range(len(theitems)): if theitems[i]==epilogi: tw=tw+x[i][1] tv=tv+x[i][0] theitems.remove(theitems[i]) x.remove(x[i]) print theitems,x