Skip to content

Commit

Permalink
Changed to the f' format (#377) (#396)
Browse files Browse the repository at this point in the history
* Changed to the f' format (#377)

* Corrected f' statement
  • Loading branch information
AnnaDinaburgVulikh committed Dec 27, 2020
1 parent da59724 commit 5793968
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
- Create a new file *my_full_name.py* using vim editor
- Get the user's first name and save it in a new variable **first_name**
- Get the user's last name and save it in a new variable **last_name**
- Print **first_name** and **last_name** using %s formatting
- Print **first_name** and **last_name** using `f'.{}.'` formatting
- Save the file and run it on the terminal
4 changes: 2 additions & 2 deletions docs/course_materials/variables_data_types.html
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,9 @@ <h3><b>Formatting</b></h3>
<pre><code data-trim data-noescape class="hljs lang-python">
>>> name = 'Tom'
>>> family_name = 'Sawyer'
>>> print('Hello %s!' % name)
>>> print(f'Hello {name}!')
>>> Hello Tom!
>>> print('Hello %s %s!' % (name, family_name))
>>> print(f'Hello {name} {family_name}!')
>>> Hello Tom Sawyer!
</code></pre>
</section>
Expand Down

0 comments on commit 5793968

Please sign in to comment.