Slice blog post in collection

How can i slice a particular post if i want to show only 5 number of post and if i want to show post only 7, 8, 9 then how we set slice i have used something like that

  For three post {% for ps in taxonomy.findTaxonomy({'category':'World'})|slice(8, 10) %}
  For Single post {% for ps in taxonomy.findTaxonomy({'category':'World'})|slice(5,) %}

Anyone can help me
Thanks

Looks about right, for the first 5 it should be |slice(0,5) as it’s start, length

http://twig.sensiolabs.org/doc/filters/slice.html

if we want to show only one like 5th number of post then how we set

it’s an array so simply pull the 5th one remebering arrays are zero-based indexed so the index is 4 for the 5th item:

{{ my_array[4] }}

Sorry we put like this but its not working
{% for ps in taxonomy.findTaxonomy({‘category’:‘World’})|slice(5,) %}