+ 1

I am beginner. Can anyone please explain how to me use insert function in python?

num = int(insert("enter a number")) print (num) ::::::: It's always showing error :::::: Please show me an simple example

11th Jul 2021, 6:51 AM
ViKasH I
ViKasH I - avatar
5 Réponses
+ 8
ViKasH I your code should be like this... num = int(input("enter a number")) print (num)
11th Jul 2021, 10:49 AM
Pallavi Bhardwaj
Pallavi Bhardwaj - avatar
+ 2
num = [0,1] i = 2 num.insert(i, int(input('Enter a number '))) print(num)
11th Jul 2021, 8:37 AM
Solo
Solo - avatar
+ 2
I think what you're looking for is the input() function.
11th Jul 2021, 8:39 AM
Simon Sauter
Simon Sauter - avatar
+ 1
Write input instead of insert
12th Jul 2021, 6:44 PM
SparkyThe Plqayer