Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Python Write a program which performs the following tasks: (1) create a list named num1 and initialize it with the following values: 'yes', 20,
In Python
Write a program which performs the following tasks:
(1) create a list named num1 and initialize it with the following values:
'yes', 20, 30, 40, 50, 'no'
(2) modify the first element to 10 using the corresponding positive index, and modify the last element to 60 using the corresponding negative index. Print the modified list num1.
(3) create another list named num2 which has three elements 70, 80, 90. Then, concatenate num2 to the back of num1, so that num1 is extended. Print the extended list num1.
The original list is ['yes', 20,30,40,50, 'no'] The modified list is [10,20,30,40,50,60] The extended list is [10,20,30,40,50,60,70,80,90]Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started