micropython/tests/basics/string-format.py

9 wiersze
216 B
Python

print("{}-{}".format(1, [4, 5]))
print("{0}-{1}".format(1, [4, 5]))
print("{:x}".format(1))
print("{!r}".format(2))
# TODO
#print("{1}-{0}".format(1, [4, 5]))
#print("{:x}".format(0x10))
#print("{!r}".format("foo"))