instead of storing the port:
j.append(port)
Why don't you append the ser
instance so you can later use like this:
j.append(ser
)
for ser in OpenPorts:
ser.write('ati')
and the later you can close them all with :
for ser in OpenPorts:
ser.close()