0
I don’t under this question, it says or at least I think it says that my input changed into a 0
what is wrong with this: queue = ['John', 'Amy', 'Bob', 'Adam',] input = int() queue.insert (4, (input)) print (queue)
2 ответов
+ 3
Hienz Ketchup
int() is a function which should accept one parameter and this function is use to convert input in integer so here
input1 = int(input())
Since queue is a collection of string so you should take input without int() function like this:
input1 = input()
queue.insert(4, input1)
Learn here how to take different inputs in python:
https://www.sololearn.com/post/1159836/?ref=app
+ 1
Input cannot be the name of a variable, input is a function
https://www.sololearn.com/Course/JUMP_LINK__&&__Python__&&__JUMP_LINK/4434/?ref=app