[docs] [issue34161] Tutorial 7.1 str.format() code example syntax error

Orlando report at bugs.python.org
Fri Jul 20 00:52:03 EDT 2018


New submission from Orlando <oboffill at icloud.com>:

Tutorial 7.1 str.format() example (https://docs.python.org/3.7/tutorial/inputoutput.html#fancier-output-formatting):

[1]yes_votes = 42_572_654 ; no_votes = 43_132_495
[2]percentage = (yes_votes/(yes_votes+no_votes)
[3]'{:-9} YES votes  {:2.2%}'.format(yes_votes, percentage))

Proposed Fix: 
Remove first open parens on line 2 and last close parens on line 3.

----------
assignee: docs at python
components: Documentation
messages: 321977
nosy: docs at python, oboff
priority: normal
severity: normal
status: open
title: Tutorial 7.1 str.format() code example syntax error
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34161>
_______________________________________


More information about the docs mailing list