I was trying out python and i made up this game kind of thing. The if condition doesnt seem to be working as i want it to.Please educate me if there is a misconception in the semantics or anything. PS : I ran this on python 3
import time
from random import randint
def tambola():
    token = input("Enter a value between 1 to 2 :  ")
    print('')
    print("Computer generating number",end='')
    time.sleep(1)
    print(".",end='')
    time.sleep(1)
    print(".")
    time.sleep(1)
    answer = randint(1,2)
    if(token == answer):  #condition doesnt seem to be working :/
        print("You win")
    else:
        print("Better luck next time")
        print(token,answer)
This is the output i am getting
Enter a value between 1 to 2 :  2
Computer generating number..
Better luck next time
2 2
 
    