import argparse
clients_ids = []
parser = argparse.ArgumentParser()
parser.add_argument('-i', '--ids', action='store', nargs='+', dest='cids', help='client_ids for sending. Example: -i=1,2,3')
arguments = parser.parse_args()
clients_ids = arguments.cids
print(clients_ids)
print(type(clients_ids))
python3 app.py -i=155,2,3
['155,2,3']
<class 'list'>