escape characters for string (#1324)

escape characters for string
This commit is contained in:
Rico Sta. Cruz 2020-01-20 16:14:26 +11:00 committed by GitHub
commit ada2e95afb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -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