nums = input("请输入多个数,以空格分隔:") num_list_bin = bytes(bytearray.fromhex(nums)) print(num_list_bin) sum = 0 for num in num_list_bin: sum += num #sum &= 0xff print("输入的数的和为:", hex(sum))