Create List of elements and add para

Hello Guys,
i want to seperate the input by its categories in lists in a dynamo script and afterward add some element parameters like shown in the secon pic. The first pic is just to show the “workflow” i guess.


Here i got my problems: Im not sure how seperate the input by category in python and also i think my add parametrs funktion isnt right. If the element dont have the parameter im searchong for i want the code to return “-”. The Error is: “Traceback (most recent call last): File “”, line 18 in TypeError:‘int’ object is not subsciptable”. Edit: Is it even possible to adress the element parameter if the python input is just a list of elements(elements IDs)?