I
I
Ivan Naumov2020-08-15 14:00:48
Python
Ivan Naumov, 2020-08-15 14:00:48

How to get a similar list [b'\x01', b'\x02', b'\x03', ...]?

How to make such a list using a loop?
string formatting cannot be used.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2020-08-15
@ivan_naum

[bytes([x]) for x in range(1, 4)]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question