diff --git a/Tutorials/Strings.py b/Tutorials/Strings.py index 70198c9..e84e684 100644 --- a/Tutorials/Strings.py +++ b/Tutorials/Strings.py @@ -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