Answer to Question #303779 in Python for Hari

Question #303779

A group of people are playing a game they are standing in a line, each carrying a card with a number on it. These numbers are given in the "A". One random number S is selected.

Find out new list of numbers after

S people are removed from left

S people are removed from right

Example [1,2,3] and S be 1

After removing from left [2,3]

After removing from right [1,2]

Output 23

        12


1
Expert's answer
2022-02-28T13:53:35-0500
n = input().split()
s = int(input())
i = s
j = len(n) - s
for i in range(i, j):
  print(i, end=' ')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS