Last half of List
You are given an integer N as input. Write a program to read N inputs and print a list containing the elements in the last half of the list.
N = int(input())
numbers = input()
listNumbers = numbers.split(' ')
print(listNumbers[int(N/-2):])
Comments
Leave a comment