Simplify negative list expansion

Signed-off-by: Felix Conway <[email protected]>
This commit is contained in:
Felix Conway
2025-07-30 13:12:47 +01:00
parent e34d06dfbf
commit 8c81b9f8dd
+1 -4
View File
@@ -74,10 +74,7 @@ def combination_two_lists(first_vals: List[T], second_vals: List[T]) -> List[Tup
def expand_list_negative(values: List[str]) -> List[str]:
"""Adds the negative of every element in the list to the list"""
new_list = []
for value in values:
new_list.extend([value, f"-{value}"])
return new_list
return values + [f"-{value}" for value in values]
def bits_to_limbs(bits: int, bits_in_limb: int) -> int:
""" Return the appropriate ammount of limbs needed to store