I have a list/array and I want to string format it. For example,
a = [1, 2, 3] and output that I want should be 010203
I tried with b = "%.2d %(a)"
, however, it gives me an error TypeError: %d format: a number is required, not list
. Of course, I can understand this error, but, I don't know the other way.
The code should be generic, I mean, when my list is like a = [10, 11, 12, 13]
, then, it should print the output like 10111213
.