Let's say I have the following list:
nums = [10,2,3,4, 8, 3]
I want to slice and index nums so that I create a new list from only some elements of the original list. For example #1:
nums_1 = [10, 3, 4, 8, 3]
Or Example 2:
nums_2 = [10, 3, 4, 3]
Is there an efficient way to do this? I tried nums.pop() but I don't want to change the original list.