To Display line{5-10} from file

Hi Guys,
can someone please tell how to display line 5 to line 10 from the registered file.
Thanks in advance.

debug: var=results.stdout_lines[5:10]