LearnPy Hub
← Lists problems
Easy

Drop the Ends

Read a list of words and print it without its first and last element, using the slice [1:-1].

Input

One line.

Output

A list.

Sample 1

Input
a b c d
Output
['b', 'c']

Sample 2

Input
x y
Output
[]
solution.py
Output appears here
Drop the Ends · Python practice problem · LearnPy Hub