diff --git a/python.md b/python.md index 0ef2df680..f885717b8 100644 --- a/python.md +++ b/python.md @@ -73,6 +73,18 @@ category: Python str.strip() str.islower() + + /* escape characters */ + >>> 'doesn\'t' # use \' to escape the single quote... + "doesn't" + >>> "doesn't" # ...or use double quotes instead + "doesn't" + >>> '"Yes," they said.' + '"Yes," they said.' + >>> "\"Yes,\" they said." + '"Yes," they said.' + >>> '"Isn\'t," they said.' + '"Isn\'t," they said.' ### Casting