Question: 3 . Use the range ( ) function to create a list of numbers running from zero to 1 2 and call your list. From

3. Use the range() function to create a list of numbers running from zero to 12 and call your list.
From your list, x, perform the following extraction/slicing in Python and show your result.
x[-3:]
[x[2:6], x[8:12]]
x[7:11]
X[0:-1]
4. Use Python to create a list (L) and a tuple (T) with the following elements.
23,abc,4.56,(2,3),def
L=
T=
5. Use Python code to extract/slice the following elements in your list and tuple that you created in Q(4) above.
4.56 and (2,3) subset from your list
4.56 and (2,3) subset from your tuple
23 and abc subset from your list
23 and abc subset from your list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!