Use parentheses rather than square brackets to call a method:
containedFiles = containedArray.partition(",")
Furthermore, you probably want to do split
rather than partition
: partition
will keep the commas in the resulting tuple, even though those commas are not in fact files:
"hello,world".partition(",")
# ('hello', ',', 'world')
"hello,world".split(",")
# ['hello', 'world']