Answers for "list in pythom"

5

list in python

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

how to use a list in python

# empty list
my_list = []

# list of integers
my_list = [1, 2, 3]

# list with mixed data types
my_list = [1, "Hello", 3.4]
Posted by: Guest on May-18-2020
5

lists in python

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

list in python

fruits = ["apple", "banana", "cherry"]
print(fruits)

fruits[0]
fruits[:2]
Posted by: Guest on June-30-2021
0

list in pythom

print("Graany boi you die")
Posted by: Guest on August-26-2021
0

list in pythom

print("granny boi you die heheeeeeeeeeeeeeee!!!")
Posted by: Guest on August-26-2021

Python Answers by Framework

Browse Popular Code Answers by Language