How to get an value

0 Rolandas Seacret · October 2, 2014
Hello everyone. Sorry if this was posted somewhere but i did not found it anywhere. The question is how to get user input integer or string and keep it in variable so i can use it? 

number = input("Enter your number: ")

if number is 13:                # is or == is the same right?
    print("Good")
else:
    print("Bad")

even if i enter 13 i cant get the message Good. If someone could explain to me how to get properly user data and keep it in variable i would be very thankful. 
P.S using PyCharm 3.4.1

Post a Reply

Replies

Oldest  Newest  Rating
0 Rolandas Seacret · October 2, 2014
Thank you very much :) you helped a lot :)
  • 1

Python

107,186 followers
About

This section is all about snakes! Just kidding.

Links
Moderators
Bucky Roberts Administrator