1.5 KiB
1.5 KiB
input_list = [34.6, -203.4, 45, 8.2, -12.3, 44.6, 12.7]
output_list = [x * x for x in input_list if x > 0]
print(output_list)
[1197.16, 2025, 67.24, 1989.16, 161.29]
8.2 ** 2
67.24