From 6130d8c3e65a0c664c880eeb75bb9f7488b61efc Mon Sep 17 00:00:00 2001 From: Matheus Felipe <50463866+matheusfelipeog@users.noreply.github.com> Date: Sun, 6 Feb 2022 17:35:45 -0300 Subject: [PATCH] Fixes space between arguments in format() Method --- python.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python.md b/python.md index 10cc7b7..fbf1eeb 100644 --- a/python.md +++ b/python.md @@ -421,9 +421,9 @@ print("%s is %d years old." % (name, age)) #### format() Method ```python -txt1 = "My name is {fname}, I'm {age}".format(fname = "John", age = 36) -txt2 = "My name is {0}, I'm {1}".format("John",36) -txt3 = "My name is {}, I'm {}".format("John",36) +txt1 = "My name is {fname}, I'm {age}".format(fname="John", age=36) +txt2 = "My name is {0}, I'm {1}".format("John", 36) +txt3 = "My name is {}, I'm {}".format("John", 36) ``` ### Input