+ 2
Input in list python
how to assign variable to an input no. and how to put that in list[ ] for example user give a number and list goes that no. of index and print what is in it misc = list['lid',1,3,5,[6,5],0] input(i,) print('misc[i]')
3 Answers
+ 2
this is just a sudeo code of it:
input = input(âInput a numberâ)
num = []
nun.append(âinputâ)
input2 = input(âDo you want to access the list?â)
if input2 == âYesâ:
print(num)
else:
print(âList not accessedâ)
0
thank you, but you missed my point, I added my code to give a concept what i am trying to do. I wanted user to input a number of index of list and display it.
0
Ok sorry