diff --git a/examples/string_format.py b/examples/string_format.py index 777c018..554a100 100644 --- a/examples/string_format.py +++ b/examples/string_format.py @@ -1,3 +1,15 @@ +# Basic placeholders + +ingredient = "sugar" +quantity = "500g" + +ingredient_string = "- {}: {}".format(ingredient, quantity) + +print(ingredient_string) + + +# Named placeholders + fname = "John" lname = "Doe"