From 8f498480ce786afdf3664cc8c6dd687a0cf4134c Mon Sep 17 00:00:00 2001 From: Therk Date: Sat, 27 Oct 2018 18:05:31 -0400 Subject: [PATCH] f-strings example with capital letter F --- .../english/python/python-f-strings/index.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/guide/english/python/python-f-strings/index.md b/guide/english/python/python-f-strings/index.md index 592aaeb7de8..201f5715759 100644 --- a/guide/english/python/python-f-strings/index.md +++ b/guide/english/python/python-f-strings/index.md @@ -25,6 +25,25 @@ print(greeting) Hello! Jon Snow ``` +### Will also work with capital letter F: + +#### Input + +```python +author = 'George R. R. Martin' +title = 'A Game of Thrones' +book = F"'{book}' by {author}" +print(book) +``` + +#### Output + +``` +'A Game of Thrones' by George R. R. Martin +``` + + + ### Evaluate an expression in a string: #### Input