import sys group_list=['Tom', 'Allen', 'Jane', 'William', 'Tony'] print(group_list[0:2]) start_index = len(group_list) // 2 - 1 end_index = start_index + 2 print(group_list[start_index:end_index+1]) print(group_list[-2:])