Problem with Jupyter online version

I keep getting this when I try to input something with the online version of Jupyter lite. It will allow me to enter for example a variable but when I try to print the variable - it will not print.

a=input(“Enter a variable”)
print(a)

PyodideFuture pending cb=[WebLoop._decrement_in_progress()]>

Try await input("enter a variable"). More context on this issue.

1 Like

The issue with input() on JupyterLite was the underlying problem prompting this thread.

The recommendations to use MyBinder-served session in the first reply are the easiest solution because you’ll get a typical Python kernel-backed session and not WASM-based. And so no need to change your code.

i was having the same problem your solution works await input("enter a variable:")

1 Like

how i will use it in for loop
import numpy as np

l=

for i in range(1,5):
inp= await input(“Enter:”)
l.append( inp)

print(type(l))
print( np.array(l))