Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 129 - 2615_KEC
P. 129

    8.  Sort:

                                     o  Sort the list in ascending order.
                                  9.  Reverse:

                                     o  Reverse the elements of the list in place.

                                  10. Clear:

                                     o  Remove all elements, leaving an empty list.

                                  11.  Copy:

                                     o  Create a shallow copy of the list.

                                  12. Slicing:
                                     o  Extract specific parts of the list using indices.

                     Step  3   Output:

                                 Display the result of each operation with clear labels.
                                   Code:

                     Submission Guidelines

                        ∑  Code File:
                         o  Submit the Python file (.py) or Google Colab link.

                        ∑  Screen Recording:

                         o  Share a demonstration video showing the execution of each list operation.

                     Bonus Challenges
                        ∑  Dynamic Lists:

                         o  Allow users to input their own list elements dynamically.

                        ∑  Nested Lists:
                         o  Perform operations on nested lists (e.g., [[1, 2], [3, 4], [5, 6]]).

                                                                                                     Hands-On Project  127

| 124 125 126 127 128 129 130 131 132 133 134 |