0

Can I store a Variable in a list?

I m creating a program where the user will input the content of a list and just asking if a variable can be store in a list. If not how can I do this, how can I store user input inside of a list?

18th Jun 2018, 9:13 AM
Russel Dungo
Russel Dungo - avatar
2 Answers
+ 3
find out what you can and cannot do with lists here https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2431/
18th Jun 2018, 9:31 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 1
you can do this: a=1 b=2 c=3 list = [input (), a, b, c] print (list) OR a=input () b=1 c=2 list=[a, b, c] print (list)
18th Jun 2018, 1:14 PM
Sahil Danayak
Sahil Danayak - avatar