You can find the information about slicing within the python docs at:
https://docs.python.org/3/library/functions.html#slice

Probably some other docs spread around as well that go into more depth.

On Tue, Sep 12, 2023 at 9:16 AM Brian Coca <[email protected]> wrote:

> You just need a join to make your current expression's output (list)
> into a string.
> But @sivel's solution with slicing is probably better, the reason you
> cannot find it in documentation is because this is a "Pythonism" and a
> property of Python list objects.
> Ansible uses Jinja for expression evaluation, Jinja compiles into
> Python in the end and exposes many of the properties of those Python
> objects, neither Ansible nor Jinja document these properties so you
> would need to a) know the type of object you are dealing with and b)
> look at python documentation for those objects.
>
>
> --
> ----------
> Brian Coca
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CACVha7fjEruAjRn1mLRnEKjRUeefb1RQwapTvfKdDnU0T9%2BO_g%40mail.gmail.com
> .
>


-- 
Matt Martz
@sivel
sivel.net

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v8rzWdpQH-qtu6u5yxsMSfK8t630%3D5WRuNyXOAqYDGUuQ%40mail.gmail.com.

Reply via email to