Computer Science, asked by harshphilp, 2 months ago

A departmental store is considering to maintain their inventory quantity of items using a
List as follows:
List=[60,50,150,250,220,110,180]. Write the python statement for the following questions
based on this.
a) Find how many items stored in list. 1
b) Add new item to the end of the list. 1
c) Delete second entry from the list. 1
d) Display last 3 entries from the list. 1
e) To display max quantity from the list.

Answers

Answered by allysia
1

I'll be using inbuilt functions:

a) print(len(List))

b) List.append("item")

c)List.remove (1)  

since the index fo 2nd element is 1.

c)print(List[-3::])

d) print(max(List))

Similar questions