ZipStrings

Joins values from two lists by index according to a given format.

python · Common Scripts

Details

IDZipStrings
Languagepython
From Version6.0.0
Docker Imagedemisto/python3:3.12.13.10116658

README

Joining values by index from 2 list according to a given format.

Script Data


Name Description
Script Type python3
Cortex XSOAR Version 6.0.0

Inputs


Argument Name Description
list1 The first list. List must be at same size as list2.
format A format to join strings by, for example- {1}-{2} will take values in the same index of both list,
where the {1} will be replaced with the value from list1 and {2} will be replaced with the value from list2.
list2 The second list. List must be at same size as list1.

Outputs


Path Description Type
zipped_list A list of joined values by the format given. string
commonfields:
  id: ZipStrings
  version: -1
name: ZipStrings
script: ''
type: python
tags: []
enabled: true
args:
- name: list1
  isArray: true
  required: true
  description: The first list. list1 must be the same size as list2.
- name: format
  description: |-
    The format to join the lists by. For example, {1}-{2} joins the values for the same index in both lists, 
    where {1} is replaced with the value from list1 and {2} is replaced with the value from list2.
- name: list2
  isArray: true
  required: true
  description: The second list. list2 must be the same size as list1.
outputs:
- contextPath: zipped_list
  description: A list of joined values as defined by the format.
  type: string
scripttarget: 0
subtype: python3
dockerimage: demisto/python3:3.12.13.10116658
runas: DBotWeakRole
fromversion: 6.0.0
comment: 'Joins values from two lists by index according to a given format.'
tests:
- No tests (auto formatted)