Computer Science, asked by godwasgreat, 6 months ago

2. Create a Python list containing elements 1, 2, 3, 4, 5, 6 in this order and change it
to a list containing 1, 2, 3,3,2,1.
Answer:​

Answers

Answered by MrUnKnOwn33
7

To creating a python list follow these commands

l1=[1,2,3,4,5,6]

this is python list with conataining elements 1,2,3,4,5,6

#modification of python list 1,2,3,4,5,6 to 1,2,3,3,2,1

l1[3:6]='3,2,1’

this command is to change python list

output : 1,2,3,3,2,1

Similar questions