a1=[1,3,-9,6,0]# Исходный массивa2=[]# Новая ебаfor i in range(len(a1)): if a1<0: a2.append(-a1) else: a2.append(a1)print(a2)
Standard input is empty
[[1, 3, -9, 6, 0], [1, 3, -9, 6, 0], [1, 3, -9, 6, 0], [1, 3, -9, 6, 0], [1, 3, -9, 6, 0]]
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!