Strings
Reference: https://docs.python.org/3/library/string.html.
Strings represent textual information, including words and alpha-numeric characters.
"Hello World"
"username123"Don't be confused if you see multi-line strings:
str = """
Some
Multi-line
String
"""
str #> '\nSome\nMulti-line\nString\n'
print(str)
#>
#> Some
#> Multi-line
#> String
#>Example string functions:
Strings also support equality, inclusion, and matching operators:
Strings are iterable objects comprised of multiple characters. Once you have learned about lists, you can perform additional list-related operations:
Last updated
Was this helpful?