Problem of zero padding in Python data processing list

Recently, I encountered a particularly strange problem while adjusting code: when using the nested list structure defined in Python to perform zero padding operations on child lists, the original list will also be extended. Sometimes, we do not want this feature. To avoid errors, we use a+ Extension of method B
Error code:
This is for x_When performing zero padding, the contents of the x list are also zeroed. When the final network returns, this operation modifies the original input x. If no loop operation is performed, the use of the new input will not be detected. Once a loop is used, there will be changes in the input data
Modification method:

Related articles