LearnPy Hub
← Exceptions problems
Easy

Safe Index

Read a line of words and an index. Print the word at that index, or Index out of range.

Input

A line of words, then an integer.

Output

One line.

Sample 1

Input
a b c
1
Output
b

Sample 2

Input
a b c
5
Output
Index out of range
solution.py
Output appears here
Safe Index · Python practice problem · LearnPy Hub