Page 154 - 2622_Delhi Police Public School_C-8
P. 154

2.  How do you create an empty list?



                     3.  Can a list contain elements of different data types?



                     4.   How do you find the length of a list?










                     5.   How do you remove elements from a list? Write down the steps.











                     6.   What is list slicing? Explain with example.












                     7.   Name five common list functions in Python. Explain them with examples.














                      Scratch Your Brain                                                        21 st  Century   #Critical Thinking
                                                                                                   Skills
                      1.  Write the output of the following:
                         a.  my_list = [1, 2, 3]

                           my_list.append(4)

                           print(my_list)

                         b.  my_list = [10, 20, 30, 40, 50]

                           sliced_list = my_list[1:4]

                           print(sliced_list)



                        Premium Edition-VIII
                152
   149   150   151   152   153   154   155   156   157   158   159