]> granicus.if.org Git - python/commitdiff
Remove extra parentheses in output formatting tutorial (GH-8350)
authorAaqa Ishtyaq <aaqaishtyaq@gmail.com>
Fri, 20 Jul 2018 16:06:44 +0000 (21:36 +0530)
committerMariatta <Mariatta@users.noreply.github.com>
Fri, 20 Jul 2018 16:06:44 +0000 (09:06 -0700)
The parentheses were incorrect.

Doc/tutorial/inputoutput.rst

index 417c3b1319c035d4239f9a972f4e52052f98b80f..dfe4c3849cbebdc2ac3cc7ac3c98444ff54fd03a 100644 (file)
@@ -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