# Option one older_method_string = "%.9f" % numvar # Option two newer_method_string = "{:.9f}".format(numvar)