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
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
python - How to print a percentage value? - Stack Overflow
Given a float between 0 and 1, how to print it as a percentage? For example, 1/3 should print as 33%. 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.
Find elsewhere
๐ŸŒ
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.
๐ŸŒ
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.
๐ŸŒ
Finxter
blog.finxter.com โ€บ home โ€บ learn python blog โ€บ how to print a percentage value in python?
How to Print a Percentage Value in Python? - Be on the Right Side of Change
May 31, 2022 - To print a percentage value in Python, use the str.format() method or an f-string on the format language pattern "{:.0%}". For example, the f-string f"{your_number:.0%}" will convert variable your_number to a percentage string with 0 digits precision. Simply run those three basic statements ...
๐ŸŒ
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