Replace % operator with format method