Group

Splits a list into smaller groups (chunks) of a specified size.

python · Community Common Scripts

Details

IDGroup
Languagepython
From Version6.10.0
Docker Imagedemisto/python3:3.12.13.7444307
TagsUtilities

README

Splits a list into group.

e.g. [1,2,3,4] -> [“1,2”, “3,4”].

Script Data


Name Description
Script Type python3
Tags Utilities

Inputs


Argument Name Description
input An input list.
chunk Size of each group.
type Group as list or string.
delimiter Separate elements using delimiter (If type is String).

Outputs


Path Description
Group The list after grouping.
commonfields:
  id: Group
  version: -1
name: Group
script: ''
type: python
tags:
- Utilities
comment: Splits a list into smaller groups (chunks) of a specified size.
enabled: true
args:
- name: input
  required: true
  description: An input list.
  isArray: true
- name: chunk
  required: true
  description: Size of each group.
- name: type
  auto: PREDEFINED
  predefined:
  - List
  - String
  description: Group as list or string.
  defaultValue: String
- name: delimiter
  description: Separate elements using delimiter (If type is String).
  defaultValue: ','
outputs:
- contextPath: Group
  description: The list after grouping.
scripttarget: 0
subtype: python3
runonce: false
dockerimage: demisto/python3:3.12.13.7444307
runas: DBotWeakRole
fromversion: 6.10.0
tests:
- No tests (auto formatted)