0
How to take input in python.
whenever i try for input the program doesn't work like: x=input() if x==5: print("working") else: print("not working") then i give input 5 but result show not working. can someone plz explain? thank you.
4 odpowiedzi
+ 7
x=input() puts a string in x. If you input 5, x will become string "5", which is not equal to integer 5.
+ 2
use raw_input()
0
use x = int(input())
- 1
x = input(" ")
if (x == 5): print("working")
else: print("not working")