Last half of List
This Program name is Last half of List. Write a Python program to Last half of List, it has two test cases
The below link contains Last half of List question, explanation and test cases
https://docs.google.com/document/d/12r-Wk4K7GMmpiGxHWymMhcXkUMBy8Okg/edit?usp=sharing&ouid=104486799211107564921&rtpof=true&sd=true
We need exact output when the code was run
N=int(input())
lst = [int(N) for N in input().split()]
out=[]
i = N//2
for x in range (N):
if x>=i and x<N:
y=lst[x]
out.append(y)
print(out)
Comments
Leave a comment