Skip to content

Instantly share code, notes, and snippets.

@Akasurde
Created July 8, 2022 09:27
Show Gist options
  • Select an option

  • Save Akasurde/2bfd06632a79b88daba479a78e4dfe78 to your computer and use it in GitHub Desktop.

Select an option

Save Akasurde/2bfd06632a79b88daba479a78e4dfe78 to your computer and use it in GitHub Desktop.
- name: Remove nth element from the list
debug:
msg: |
{% set _ = my_list.pop(index) %}
{{ my_list }}
vars:
my_list: [1, 2, 3, 4, 5, 6]
index: 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment