In [1]:
l = [0, 1]
print(type(l))


<class 'list'>

In [2]:
# print('{:*^16}'.format(l))
# TypeError: unsupported format string passed to list.__format__

In [3]:
print(type(str(l)))


<class 'str'>

In [4]:
print('{:*^16}'.format(str(l)))


*****[0, 1]*****