Last active
August 29, 2015 14:27
-
-
Save harfordt/b5343eb047dfefb0697a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inline int casting | |
user_age = int(input("Your age: ")) | |
# separating the input from the cast | |
age_as_string = input("Your age: ") | |
user_age = int(age_as_string) | |
# this is more confusing, using the same variable name | |
user_age = input("Your age: ") | |
user_age = int(user_age) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment