I'm trying to figure out how to print formatted strings rounding to significant figures. Say I have:
x = 8829834.123 And I want to print it rounded to four sig figs, as an integer. I tried:
print "%4d"%x and I just get:
8829834 Why won't it display:
8829000? I thought that was how string formatting worked.