def negated(a):
a = set(a)
for i in a:
a.add(-i)
return list(a)
if a = [ 3, 4, 5, 6, 7, 8, -3, -4]
. I only want to print the values that have a negated counterpart ex: 3, -3, 4, -4
I don't know what's wrong with my code.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…