Home > Blockchain >  Input() keeps skipping the actual input
Input() keeps skipping the actual input

Time:10-09

I am trying to get a few inputs in Python and for some reason. I have code like this .

input("foo")

x = print("bar")

The console skips the input and goes straight to x. Well, it does not actually skip input, it just leaves it blank.

How do i ensure i get the input ?

CodePudding user response:

Correct syntax:

x = input("foo")
print(x)

CodePudding user response:

What you probably want is:

in = input("Your name: ")
print(in)
  • Related