4) Write a script which will divide the list A from the middle and create a new list B by adding the first half to the end of it. If the list has odd number of items, keep the additional item in the...


can you solve this on python


4) Write a script which will divide the list A from the middle and create a new list B by adding the first half to the end<br>of it. If the list has odd number of items, keep the additional item in the first half when dividing the list.<br>Examples:<br>A = [1, 2, 3, 4, 5, 6]<br>В %3D [4, 5, 6, 1, 2, 3]<br>А 3D [1, 2, 3, 4, 5]<br>В %3D [4, 5, 1, 2, 3]<br>11<br>

Extracted text: 4) Write a script which will divide the list A from the middle and create a new list B by adding the first half to the end of it. If the list has odd number of items, keep the additional item in the first half when dividing the list. Examples: A = [1, 2, 3, 4, 5, 6] В %3D [4, 5, 6, 1, 2, 3] А 3D [1, 2, 3, 4, 5] В %3D [4, 5, 1, 2, 3] 11

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here