Relative Content

Tag Archive for pythonpython-3.xif-statement

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.