title: How do I print specific items from a python list?
body: <p>I am trying to print multiple items from a list in Python. I have looked at many examples but I am unable to get them to work. What is a good way to print items from the imported list based on their list index.</p>
  <p>The commented out example in my code is what I thought will work and cant find a simple solution.</p>
  <pre><code>items = []
  
  with open('input.txt') as input_file:
      for line in input_file:
          items.append(line)
  
  print(items[5],items[6])
  #print(items[5,6,7]
  </code></pre>