Computer Science, asked by Ehtasham22, 5 months ago

write a program to create a list and use any four methods in list​

Answers

Answered by zezus
0

Answer:

python programm to create a list

first method

list = ["abcd" , "efghh"]

print (list)

second method

list = ["apple", "banana", "cherry"]

for x in thislist:

print(x)

third method

list = ["apple", "banana", "cherry"]

print(list[1])

fourth method

list = ["apple", "banana", "cherry", "orange", "kiwi", "melon", "mango"]

print(list[2:5])

Similar questions