Thanks for your quick reply. This is a very useful function.
Firstly, in my case, I should use
Secondly, I want to make it even easier, for example, using a loop to define all of the PIN together. This should be a basic function in Python. please check below wrong code.
for i in range (2): 'padN'+str(i).raise_pins(['out0'],['out'+str(i)]) #AttributeError: 'str' object has no attribute 'raise_pins'