#!/usr/bin/python3
def safe_print_list(my_list=[], x=0):
    try:
        for i in my_list[:x]:
            print(my_list[i], end="")
    except IndexError:
            print("the {:d} is out of bound".format(x))



safe_print_list([1,2,3,4,5], 6)
