lst = ["python", "c", "java", "c++", "php", "c#"]
first_three = lst[0:3]
print(first_three)
first_two = lst[:2]
print(first_two)
all_but_last_two = lst[:-2]
print(all_but_last_two)
second_and_third = lst[1:3]
print(second_and_third)
every_second = lst[::2]
print(every_second)
last = lst[-1]
print(last)
'''
run:
['python', 'c', 'java']
['python', 'c']
['python', 'c', 'java', 'c++']
['c', 'java']
['python', 'java', 'php']
c#
'''