valueStr = input("Введите числа: ")
value = valueStr.split()
numbers = [int(x) for x in value]
result = sum(numbers)
output = " + ".join(str(x) for x in numbers)
output += " = " + str(result)
print(output)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
valueStr = input("Введите числа: ")
value = valueStr.split()
numbers = [int(x) for x in value]
result = sum(numbers)
output = " + ".join(str(x) for x in numbers)
output += " = " + str(result)
print(output)