Python lists | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Python lists

The question is : >>>names=["a","b","c"] what will be output now?

9th Aug 2018, 8:24 AM
Naresh
18 Answers
+ 10
you could test this yourself. though try it without the >>> , that is useless to include and will cause an error. all it does it make a list of strings you typed. it does not print it.
9th Aug 2018, 10:40 AM
Ahri Fox
Ahri Fox - avatar
+ 3
Well that helped alot #CodeLazar
8th Sep 2020, 12:42 PM
Amani TC
Amani TC - avatar
+ 2
you should use list as a variable name. creating a list itself outputs nothing
9th Aug 2018, 9:09 AM
Markus Kaleton
Markus Kaleton - avatar
0
You only store "a", "b" and "c" in list(names) You didnt anything
9th Aug 2018, 8:42 AM
Sousou
Sousou - avatar
0
My question is: >>>list =["Ramu", "Pavan", "Naresh"]
9th Aug 2018, 9:06 AM
Naresh
0
k
12th Aug 2018, 12:11 PM
Naresh
0
print("names") >>>a,b,c
31st Jul 2020, 9:00 PM
DeadEye UNT
DeadEye UNT - avatar
0
print(names) >>>["a","b","c"] or None
1st Aug 2020, 12:00 PM
Manuchehr Raupov
Manuchehr Raupov - avatar
0
A big, huge, mess; if you were to have that function correctly, however, it would would like so: names=["a", "b", "c"] print("names [0]") //run >>>names a //it is like so because the way that I have SELECTED THE OBJECT IN THE LIST : "0". AND also in the way that there is an appropriate output for the code to work with. I don't really know what kind of an answer you were expecting, but I hope this is it.
11th Aug 2020, 1:15 PM
Achilles Light
Achilles Light - avatar
0
The output would be nothing as it only stores the values you gave to python If you would print the variable then only any output will come else nothing
22nd Aug 2020, 12:42 PM
Spectreops_Unknown
Spectreops_Unknown - avatar
0
Anyone else feel insane when they type code and it doesn't show an error
28th Aug 2020, 3:36 PM
Amani TC
Amani TC - avatar
0
no output
30th Aug 2020, 11:49 AM
shiven rasgotra
shiven rasgotra - avatar
0
no
11th Sep 2020, 10:40 AM
Billy
0
yes
11th Sep 2020, 10:40 AM
Billy
0
maybe
11th Sep 2020, 10:40 AM
Billy
0
bruh
30th Sep 2020, 11:09 AM
Lee Antill
Lee Antill - avatar
0
Remember, the first is zero instead of one.
31st Oct 2020, 9:43 AM
Petra
- 2
It’s like array in cpp so u store the list of word in the file names so nothing will print because you didn’t ask it to print Or u can think a list like a smart box which will give u the thing u want when u ask it
21st Aug 2020, 10:08 AM
Kalid Mohammedsherif
Kalid Mohammedsherif  - avatar