
Oct. 11, 2021
9:20 a.m.
11.10.21 01:35, MRAB пише:
Maybe what's needed is to add, say, '*' to the format string to indicate that multiple values should come from an iterable, e.g.:
struct.pack_into(f'{len(nums)}*Q', buf, 0, nums)
in this case len(nums) from the nums argument.