I want to get "The fourth item in 'days' is: Thu
But, I don't know why it doesn't work that I want
def get_x(a, b): a[b] days = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] print("The fourth item in 'days' is:", get_x(days, 3))
Your get_x returns nothing.
get_x
def get_x(a, b): return a[b] days = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] print("The fourth item in 'days' is:", get_x(days, 3)) The fourth item in 'days' is: Thu
2.1m questions
2.1m answers
60 comments
57.0k users