From fed6ffb606fdf64df6ca2916e0c692a9e12aa107 Mon Sep 17 00:00:00 2001 From: DanSLuong Date: Thu, 28 Mar 2019 01:39:34 -0500 Subject: [PATCH] Fix(guide): Edited the formatting added title (#32577) --- .../python/data-structures/strings/index.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/guide/english/python/data-structures/strings/index.md b/guide/english/python/data-structures/strings/index.md index 19206144adb..b8910b40572 100644 --- a/guide/english/python/data-structures/strings/index.md +++ b/guide/english/python/data-structures/strings/index.md @@ -1,10 +1,17 @@ --- title: The Python Strings --- -Python allows `str` objects, or _strings_, to be expressed in a few different ways: +# Strings +Python allows `str` objects, or [_strings_](https://docs.python.org/2/library/string.html), to be expressed in a few different ways: -* Single quotes: `'Single quote strings can have "double" quotes inside.'` -* Double quotes: `"Double quote strings can have 'single' quotes inside."` +* Single quotes: + + `'Single quote strings can have "double" quotes inside.'` + +* Double quotes: + + `"Double quote strings can have 'single' quotes inside."` + * Triple quoted: """Triple quoted strings can span multiple lines. @@ -20,7 +27,7 @@ Python allows `str` objects, or _strings_, to be expressed in a few different wa File "", line 1, in TypeError: 'str' object does not support item assignment - Instead, you can convert the string into a list, modify the list element (string character) you wish to change, and then join the list elements back to a string, like so: + Instead, you can convert the string into a list, modify the list element (string character) you wish to change, and then join the list elements back to a string, like so: >>> foo = "my string" >>> foo_list_form = list(foo) @@ -99,4 +106,4 @@ Using the `+` operator on strings leads to `concatenation`, while the `*` operat ## Reference: -Text Sequence Type _str_ +Python Documentation - Text Sequence Type _str_