Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use jupyter notbook Q1 part A ''' write a program to remove the item present at index 3 and add it to the 2nd position

use jupyter notbook

Q1 part A

'''

write a program to remove the item present at index 3 and add it to the 2nd position and at the end of the list.

sample_input = [54, 44, 27, 79, 91, 41]

sample_output = [54, 44, 79, 27, 91, 41, 79]

'''

part b

'''

write a python program which accepts a sequence of comma-separated numbers from user and generate a list and tuple with those numbers.

sample data : 8, 24, 65, 3

output :

List : ['8' , '24' , '65' , '3']

Tuple : ('8' , '24', '65' , '3')

'''

part c

'''

slice the below list into 3 equal parts, reverse each part and print it as 3 separate list.

input = [11, 45, 8, 23, 14, 12, 78, 45, 89]

note: should only use slicing

'''

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

Which of the following is true with respect to the PV function

Answered: 1 week ago