0

Lists

I don’t know how to write lists. Can someone help me?

20th Jul 2018, 2:46 AM
HappyCoder😃
HappyCoder😃 - avatar
6 Answers
+ 1
Yes,that is it thanks a lot!
20th Jul 2018, 2:50 AM
HappyCoder😃
HappyCoder😃 - avatar
+ 12
list = ['did' , 'u', 'mean' , 'this?'] https://www.sololearn.com/learn/Python/2431/
20th Jul 2018, 2:49 AM
Frost
Frost - avatar
+ 2
I think first you should go through python tutorial from sololearn.
20th Jul 2018, 2:55 AM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar
+ 1
How to create lists I guess. If so, you just need assign to your variable the list inside square brackets [], (elements) separated by commas.
14th May 2021, 11:32 AM
Idris Rèmilèkoun AMINOU
Idris Rèmilèkoun AMINOU - avatar
+ 1
Empty list Food = []
15th Jul 2021, 7:50 PM
Moocatpie
Moocatpie - avatar
+ 1
First, write the name you want for the list (you can not use numbers in the first of the name) Next, you open an equal sign (=) and then an bracket. Then you write the items in the list, note that if it was a number, you only write the number, and if it was a string, be sure to write it between two quotes ("or '). All items in the list are separated by commas, and sometimes a comma is placed after the last item that does not need to be used. Finally you close the brackets. I hope I helped you💛
4th Jun 2022, 4:49 PM
Ramtin Jafari
Ramtin Jafari - avatar