x=10 y=20 print(" Before {:3d} and {:3d} ".format(x,y)) x,y=y,x print(" After {:3d} and {:3d} ".format(x,y)) x1=1.0 x2=2.0 print(" Before {:4.1f} and {:4.1f} ".format(x1,x2)) x1,x2=x2,x1 print(" After {:4.1f} and {:4.1f} ".format(x1,x2))