Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Tutorials/Strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,21 @@

# Invalid: "he said "welcome!""
message = 'he said "welcome!"' # Correct

# You can also use the backslash character to ignore quotes
message = 'mary\'s ice cream'
message = "she exclaimed \"good\" morning"

# Use three double quotes for a multiline string
message = """ hello
line1
line2
line3
...
"""
print(message)

# Different avaliable functions for strings

# | Length |
a = len("hello") # a = 5