Python script Input Error "TypeError: expected int, got list"

I have created a python script that is working fine for single string input but when I am giving input as a list it is giving an error as below.

can you suggest some solution for this how can I use the list as an input?
below is the code for my script.


Please try searching for similar topics before posting a question. This situation comes up a lot and has been answer many times already. If you have any trouble with one of the existing solutions to this question let us know, with specifics, so that we can try to help you out.

Hi @Nick_Boyts
Thanks for the quick reply, I am very sorry to post on this topic.
actually, before posting I went through the below topic in which you have given a solution.

As I am new to python so not getting the things easily.
I would be very thankful if you can guide me on my issue.

That’s a good start. There are other topics that probably go into more detail that you could look at, but the general idea is to create a loop to iterate through each item in the list individually.

Thanks, @Nick_Boyts
I will try Looping in to the list.