I'm writting a code for rock scissor paper game. But when I run it, it falls into infinite loop.
The problem happened in following code. Why this code result in infinite loop for any input value? (my python version is 3.5.0)
class Peoples(object):
def recept(self):
u = input('choose..r or s or p: ')
print('choice: ',{'r':'rock','s':'scissor','p':'p'}.get(u,'{} (wrong input)'.format(u)))
return {'s':0,'r':1,'p':2}.get(u,self.recept())
P=Peoples()
P.recept()