0

when i use .format() on a html string the Css in the html ruin the formatting. what can i do to solve this problem ?

<style type='text/css'>
@media only screen and (min-width: 620px) {
  .u-row {
    width: 600px !important;
  }
</style>

the error :

</html>""".format(
          ^^^^^^^
ValueError: unexpected '{' in field name
wissem
  • 17
  • 5
  • 1
    Does this answer your question? [How do I escape curly-brace ({}) characters in a string while using .format (or an f-string)?](https://stackoverflow.com/questions/5466451/how-do-i-escape-curly-brace-characters-in-a-string-while-using-format-or) – ivvija May 12 '23 at 13:52

0 Answers0