1
How to remove brackets and commas from output when printing a list in Python? For example, I need the result of the code I did to look like this: 3 8 0 6 7
with numbers separated by space and just that, but the output is like this: [3, 8, 0, 6, 7]
. How I remove this list formatting?
Code below:
numeros = input().split()
numeros = [int(x) for x in numeros]
maior_numero = max(numeros)
for i in range(len(numeros)):
numeros[i] = maior_numero - numeros[i]
print(numeros)