Remove all items in list of string properties

Hey everybody! So I have a list of strings and I want to remove everything from all the string properties at once.
This probably has a simple answer but I’m pretty new to scripting still.

Here’s what I got:

import bge


cont = bge.logic.getCurrentController()
own = cont.owner


list = [own['1'], own['2'], own['3'], own['4']]


for i in list:
    for j in i:
        j = ""

Thanks!

You can either delete from start to end with:

del list[:]

Or reassign it:

list = []

Side note: do not use “list” as a variable. It is a built in function and may cause issues if used as a variable.

thanks, but I want to remove what is in the properties in the list, not the properties them selves, if that makes any sense.

Try this:

for count, i in enumerate(propList):
    own[str(count)] = None

that works for all but the last property

Oh yeah that is because enumerate returns the index value so just do str(count+1).

Ok, thanks!

deleted…disregard