Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
Recent questions tagged string-formatting
0
votes
Q: How can I print literal curly-brace characters in python string and also use .format on it?
y = " \{ Hi\} {0} " print y.format(43) it's showing an error: Key Error: Hi\\ I want to print the output from the above syntax: {Hi} 43 Select the correct answer from above options...
asked
Jan 22, 2022
in
Education
by
JackTerrance
string
string-formatting
curly-braces
0
votes
Q: String formatting: % vs. .format
In Python 2.6, the str.format() has been introduced and has a slightly different syntax than existing % operator. ... %s" % some_info) Select the correct answer from above options...
asked
Jan 22, 2022
in
Education
by
JackTerrance
python
logging
string-formatting
python-faq
To see more, click for the
full list of questions
or
popular tags
.
...