str % .. accepts a tuple as a right-hand operand, so you can do the following:

>>> x = (1, 2)
>>> y = 'hello'
>>> '%d,%d,%s' % (x + (y,))  # Building a tuple of `(1, 2, 'hello')`
'1,2,hello'

Your try should work in Python 3, where Additional Unpacking Generalizations is supported, but not in Python 2.x:

>>> '%d,%d,%s' % (*x, y)
'1,2,hello'
Answer from falsetru on Stack Overflow
🌐
Stack Abuse
stackabuse.com › python-string-interpolation-with-the-percent-operator
Python String Interpolation with the Percent (%) Operator
August 24, 2023 - Here we only have a single element to be used in our string formatting, and thus we're not required to enclose the element in a tuple like the previous examples. These placeholders represent a signed decimal integer.
Discussions

Do you normally use string.format() or percentage (%) to format your Python strings?

Firstly, you can write e. g. {0:.2f} to specify a float with 2 decimals, see e. g. https://www.digitalocean.com/community/tutorials/how-to-use-string-formatters-in-python-3

Secondly, the best formatting method is f-strings, see e. g. https://www.blog.pythonlibrary.org/2018/03/13/python-3-an-intro-to-f-strings/

More on reddit.com
🌐 r/Python
130
75
June 3, 2018
escaping - How can I selectively escape percent (%) in Python strings? - Stack Overflow
Note that the % method is not depreciated in Python 3.6. It will continue to be supported in lieu of its similarity to c, c++, etc. str.format() and f-strings are preferred but not enforced. 2017-04-07T21:02:18.313Z+00:00 ... Just noticed that If the string is a json string, being read from a file you don't even need to escape the % sign. Just % will do 2017-12-19T16:24:38.993Z+00:00 ... The only problem with ... More on stackoverflow.com
🌐 stackoverflow.com
python - How do I print a '%' sign using string formatting? - Stack Overflow
Original Number: 0.25 Formatted Number with percentage: 25.00% Original Number: -0.25 Formatted Number with percentage: -25.00% ... The new Python 3 approach is to use format strings. More on stackoverflow.com
🌐 stackoverflow.com
Python format string for percentage with space before % - Stack Overflow
I'd like to format a number as percentage, i.e. More on stackoverflow.com
🌐 stackoverflow.com
People also ask

What is the standard way to print a literal percent sign using Python's % formatting
ANS: Use a double percent sign (%%) in your format string where you intend the literal ‘%’ to appear.
🌐
sqlpey.com
sqlpey.com › python › python-print-literal-percent-in-string-format
Python String Formatting: How to Print a Literal Percent Sign Amidst ...
Do I need to escape the percent sign in Python 3 f-strings
ANS: No, percent signs are generally treated as literal characters in f-strings unless they are part of an explicit format specifier sequence, which is rare in modern f-string usage.
🌐
sqlpey.com
sqlpey.com › python › python-print-literal-percent-in-string-format
Python String Formatting: How to Print a Literal Percent Sign Amidst ...
How to print a literal curly brace in .format() or f-strings
ANS: Use double curly braces: {{ prints { and }}}.
🌐
sqlpey.com
sqlpey.com › python › python-print-literal-percent-in-string-format
Python String Formatting: How to Print a Literal Percent Sign Amidst ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › different-ways-to-escape-percent-in-python-strings
Different Ways to Escape percent (%) in Python strings - GeeksforGeeks
July 23, 2025 - Introduced in Python 3.6, f-strings are a modern and preferred way to format strings. When using f-strings, the percent sign can be included directly in the string without any need for special escaping:
🌐
Reddit
reddit.com › r/python › do you normally use string.format() or percentage (%) to format your python strings?
r/Python on Reddit: Do you normally use string.format() or percentage (%) to format your Python strings?
June 3, 2018 -

There are two ways of string formatting in python and I've been consistently using the percentage (%) method until now:

"Today is %s." % datetime.now() # 2018-06-03 16:50:35.226194
"%d is a good number." % 5 # 5

I know this may not be very eloquent, but does the job well. One of the major irritants for me is the number to string conversion, I've faced that error so many times in the earlier days when I simply used to "There are " + x + " mangoes.". This works great in most other languages as they "auto-convert" the x from integer to string, but not python because of its "explicitness". But today, I learned of this new method of string.format() which does the same job, perhaps more eloquently:

"Today is {0}.".format(datetime.now()) # 2018-06-03 16:50:35.226194 
"{0} is a good number.".format(5) # 5

The only problem I'd imagine would be when you have to deal with long floats:

f = 1.234535666
"this is a floating point number: {0}".format(f) # 1.234535666

Problem here is that it will output the entire float as it is without rounding, and here is where my percentage method has an edge!

"this is a floating point number: %.2f" % f # 1.23
🌐
Python Guides
pythonguides.com › percent-sign-mean-in-python
Python Percent Symbol (%)
April 20, 2026 - In my experience, using %s and %d is a quick way to build logs or simple UI strings when you don’t want the overhead of modern template engines. When working with the datetime module, the percent symbol acts as a directive for formatting dates.
🌐
Powerfulpython
powerfulpython.com › blog › python-string-formatting
Python String Formatting
My guidance in a nutshell (with explanations below): Go ahead and master str.format() now. Everything you learn transfers entirely to f-strings, and you'll sometimes want to use str.format() even in cutting-edge versions of Python. Prefer f-strings when working in a codebase that supports it - meaning, all developers and end-users of the code base are certain to have Python 3.6 or later. Until then, prefer str.format(). Exception: for the logging module, use percent-formatting, even if you're otherwise using f-strings.
Find elsewhere
🌐
Java2Blog
java2blog.com › home › python › print percentage sign in python
Print Percentage (%) Sign In Python? [3 Ways] - Java2Blog
November 26, 2023 - When using string formatting with the % operator, the percentage sign must be escaped by another percentage sign. ... In Python 2, you don’t need parentheses for the print statement.
🌐
Real Python
realpython.com › python-modulo-string-formatting
Modulo String Formatting in Python – Real Python
March 18, 2026 - As you’ll see shortly, you can ... To insert a percent character (%) into the output, you can specify two consecutive percent characters (%%) in the format string....
🌐
sqlpey
sqlpey.com › python › python-print-literal-percent-in-string-format
Python String Formatting: How to Print a Literal Percent Sign Amidst Placeholders
November 4, 2025 - In this style, curly braces ({}) denote placeholders, so the percent sign loses its special formatting role, making literal inclusion easier. If you need to display a literal % alongside bracketed placeholders, simply include the % character where desired. ... test_val = "validation passed" ...
🌐
Getacademy
getacademy.blog › percent-sign-python
Percent Sign in Python: Master Modulo & String Formatting [Guide] - GetAcademy.blog
Conversely, the %d specifier is strictly reserved for signed decimal integers. Using these specifiers ensures that python percent string formatting remains predictable during basic data conversion. When providing multiple values, they must be enclosed within a tuple following the operator.
🌐
UC Berkeley Statistics
stat.berkeley.edu › ~spector › extension › python › notes › node42.html
Formatting Strings
>>> fstring = 'The number is %5.3f' % (7) >>> fstring 'The number is 7.000' Notice that the field width was specified as 5, because it needs to be wide enough to display the number along with the decimal point. The %g and %G formatting codes will use normal notation when the exponent of a number is greater than -4, and the specified width is sufficient to display the number. If either of these conditions is not true, then exponential notation will be used. The right hand argument to the percent sign must contain a tuple, although parentheses are not strictly required when there is exactly one argument to be formatted.
🌐
CodeGenes
codegenes.net › blog › what-does-percent-mean-in-python
Understanding the Percent Sign (`%`) in Python — codegenes.net
The percent sign is also used for old-style string formatting in Python. This allows you to insert values into a string at specific positions. You use placeholders in the string, and then provide the values to be inserted after the percent sign.
🌐
CodeRivers
coderivers.org › blog › percent-sign-in-python
Demystifying the Percent Sign (%) in Python - CodeRivers
February 22, 2026 - Python also has newer string formatting methods like the format() method and f-strings (available since Python 3.6). While the percent sign formatting is still valid, f-strings are generally more concise and easier to read.
🌐
Real Python
realpython.com › videos › dealing-with-percentages
Dealing With Percentages in F-Strings (Video) – Real Python
Normally when it’s a tax rate, you want to say 20%. So once again, you can put the colon and put the percentage sign, and it says the tax rate is 20%, yes, but with lots of zeros, we don’t want that.
Published: November 12, 2024
🌐
YouTube
youtube.com › shorts › W9tEM8rWpCk
Percent Formatting In Python | Python Tutorial - YouTube
Here's how to use percent formatting on Python strings!#coding #pythontutorial #pythonforbeginners #python #100daysofpython #pythontutorialforbeginners #codi...
Published: May 28, 2024
🌐
w3resource
w3resource.com › python-exercises › string › python-data-type-string-exercise-36.php
Python: Format a number with a percentage - w3resource
June 12, 2025 - print("Original Number: ", y) # Format the value of 'y' as a percentage with two decimal places and print it. print("Formatted Number with percentage: "+"{:.2%}".format(y)) # Print an empty line for spacing.