You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
355 B

# test f-string debug feature {x=}
def f():
return 4
def g(_):
return 5
def h():
return 6
x, y = 1, 2
print(f"{x=}")
print(f"{x=:08x}")
print(f"a {x=} b {y} c")
print(f"a {x=:08x} b {y} c")
print(f'a {f() + g("foo") + h()=} b')
print(f'a {f() + g("foo") + h()=:08x} b')
print(f"a {1,=} b")
print(f"a {x,y,=} b")
print(f"a {x,1=} b")