Getting an if/else statement to read from a list after a user imputs a certain piece of information
super new to python, and just trying out a few if else statements on my own. I wanted to try and make an if/else which reacted to user inputs, but all im getting back is the else statement at the bottom, and not one of the other statements. i’ve been looking around and cant find an answer as to what im messing up. thank you for any assistance you can give!
How to get different outputs from different inputs with an if statement in python?
So while trying to use an if statement and an input(), I ran into a slight (potentially skill related) issue: I was trying to do something were if I write 3 into x, the if statement outputs 3, if I write 15 it outputs 15. I want to do this within a singular if statement and not through 26 as I like code that’s small and fast.