lundi 20 juin 2016

How do I use inputstream in python 3?

I have this line of code:

incoming = input("Type in 1 or 2")

if incoming == 1:
    print ("you entered 1")
elif incoming == 2:
    print ("you entered 2")

this worked perfectly fine when I used python 2... on my mac, but on windows with python 3, not so well.

Can anybody explain this to me?

Aucun commentaire:

Enregistrer un commentaire