circuitpython/tests/basics/string-format-modulo.py

23 lines
359 B
Python
Raw Normal View History

print("=%s=" % 1)
print("=%s=%s=" % (1, 2))
print("=%s=" % (1,))
print("=%s=" % [1, 2])
print("=%s=" % "str")
print("=%r=" % "str")
try:
print("=%s=%s=" % 1)
except TypeError:
print("TypeError")
try:
print("=%s=%s=%s=" % (1, 2))
except TypeError:
print("TypeError")
try:
print("=%s=" % (1, 2))
except TypeError:
print("TypeError")