ml to grams code example Example 1: grams in kg def kg_to_g(kg): return kg*1000 Example 2: tbsp to grams 1 Tablespoon is 15 grams