Answer:
Following are the program in the Python Programming Language
#list type variable
play_list = [10,20,30,40,50,60,70,80]
k=3 #integer type variable
j=len(play_list) #integer type variable
new_list=play_list[k:j] #solution is here
print("play_list: ",play_list) #print variable play_list
print("new_list: ",new_list) #print variable new_list
Output:
play_list: [10, 20, 30, 40, 50, 60, 70, 80]
new_list: [40, 50, 60, 70, 80]
Step-by-step explanation:
Here, we set the list type variable "play_list" and assign elements in it is [10,20,30,40,50,60,70,80] then, we set an integer type variable "k" and assign value is 3.
- Then, we set an integer type variable "j" and assign the length of the variable "play_list" in it.
- Then, set the list type variable "new_list" and assign the elements of the variable "play_list" after applying slicing on it.
- Finally, print the variable "play_list" and the variable "new_list".