Task 2 Write a Python program that takes a list as an input from the user.Then creates a new list excluding the first and last two elements of the given list and prints the new list. If there are not...




Must show it in Python:



Please show step by step with comments.



Please show it in simplest form.



Please don't use any functions




Please don't use any def func ()


Task 2<br>Write a Python program that takes a list as an input from the user.Then creates a new list excluding the first and last two elements of the given list and<br>prints the new list. If there are not enough elements in the list to do the task, the print

Extracted text: Task 2 Write a Python program that takes a list as an input from the user.Then creates a new list excluding the first and last two elements of the given list and prints the new list. If there are not enough elements in the list to do the task, the print "Not possible". Note: You may use list slicing. ====: Sample Input 1: [10, 20, 24, 25, 26, 35, 70] Sample Output 1: [24, 25, 26] ==== === Sample Input 2: [10, 20, 24, 25, 26] Sample Output 2: [24] ==== === Sample Input 3: [10, 20, 24, 25] Sample Output 3: =====: ================= Sample Input 4: [10, 20, 24] Sample Output 4: Not possible ====== === ==========

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here