Combining lists with called index

How come I have to use the str() command before combining specific indexes of lists?

When I try:
list1 = [‘X’, ‘Y’, ‘Z’]
list2 = [‘A’, ‘B’, ‘C’, ‘D’, ‘E’]

list3 = list1[0] + list2[0:3]

I get the TypeError: must be str, not list. I thought I was combining lists. Does it have to do with the index calling?

  • A call using a list index returns a list element; in this case, list1[0] is the string 'X’
  • A call using a list slice returns a list; in this case,list2[0:3] is the list [‘A’, ‘B’, ‘C’]

:arrow_right: To use the + operator, both operands must be lists.