I want to get this code to run for my home work but when I run it nothing happens. the code is
a = [4,8,15,16,23,42]
a[1:3]
Your code is not exactly wrong. It's just that you need to do something with that part of a list. Either assign it to a variable
suba = a[1:3]
or print it out in console if you'd like
print(a[1:3])