Answers for "how to use lists in python"

6

list in python

myfavouritefoods = ["Pizza", "burgers" , "chocolate"]
print(myfavouritefoods[1])
#or
print(myfavouritefoods)
Posted by: Guest on January-26-2021
2

how to make lists in python

list = [integers seperated by commas]
Posted by: Guest on January-01-2021
5

lists in python

lst = ["abc", 34, True, 40, "male"]
for i in lst:
	print(i)
Posted by: Guest on March-17-2021
2

how to make lists in python

listName = [whatever,whatever,etc.]
Posted by: Guest on January-01-2021
12

python lists

thislist = ["apple", "banana", "cherry"]
print(thislist[1])
Posted by: Guest on January-07-2020
2

python dlist

#this is how  to create a list:
#I named it mylist, but you can name it whatever you like

myList = [1,2,3,4,5]
print(myList[0]) # this will print the first element of the list
print(myList[1]) #this will print the second element of the list
print(myList[2])#and so on
print(myList[3])
print(myList[4])
Posted by: Guest on April-08-2020

Code answers related to "how to use lists in python"

Python Answers by Framework

Browse Popular Code Answers by Language