simple fmt function to format a string similar to Python's str.format() function