summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorAaqa Ishtyaq <aaqaishtyaq@gmail.com>2018-07-20 16:06:44 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2018-07-20 16:06:44 (GMT)
commitcb5f3fdb9d353a572dd22fb50a110e52d5bb81b1 (patch)
tree922fac174c90c7185b90b9973e7ddf8e273789fa /Doc/tutorial
parentfb47bca9ee2d07ce96df94b4e4abafd11826eb01 (diff)
downloadcpython-cb5f3fdb9d353a572dd22fb50a110e52d5bb81b1.zip
cpython-cb5f3fdb9d353a572dd22fb50a110e52d5bb81b1.tar.gz
cpython-cb5f3fdb9d353a572dd22fb50a110e52d5bb81b1.tar.bz2
Remove extra parentheses in output formatting tutorial (GH-8350)
The parentheses were incorrect.
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/inputoutput.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst
index 417c3b1..dfe4c38 100644
--- a/Doc/tutorial/inputoutput.rst
+++ b/Doc/tutorial/inputoutput.rst
@@ -41,8 +41,8 @@ printing space-separated values. There are several ways to format output.
::
>>> yes_votes = 42_572_654 ; no_votes = 43_132_495
- >>> percentage = (yes_votes/(yes_votes+no_votes)
- >>> '{:-9} YES votes {:2.2%}'.format(yes_votes, percentage))
+ >>> percentage = yes_votes/(yes_votes+no_votes)
+ >>> '{:-9} YES votes {:2.2%}'.format(yes_votes, percentage)
' 42572654 YES votes 49.67%'
* Finally, you can do all the string handling yourself by using string slicing and