Page 142 - Code_GPT_Class_8
P. 142

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)



                        CodeGPT (Ver. 4.0)-VIII
                140
   137   138   139   140   141   142   143   144   145   146   147