How can I use the input directly in python block code?

for ex, I want to copy input port 1 (self, 1) to a list named ks,
how can i do in the python block ?