Escape Characters - Python: Tutorial 26

preview_player
Показать описание
In this tutorial I go over escaping characters. Escaping involves using a \ and then the following character is ignored. \t can be used to put a tab in a string and \n continues the string on the next line.

Thanks for watching!!!! Comment, like, and subscribe

My Links:

These tutorials take a lot of time out of my day. If you feel obligated to make a donation, there's a link on my channel. Thanks!
Рекомендации по теме
Комментарии
Автор

hey at 2:52, the input in the story should be; story = "I screamed \"he's going to kill me\" " then why the result is
'I screamed "he\'s going to kill me"' can you please explain?

babasumukhesh
Автор

Hey great video! Thanks :) I have a question. So what I am trying to do is, replace a few escape characters in some unicode string and I am not sure how do to do that. Like:
\/ -> /
\\ -> \
\' -> '
\” -> “

Any idea on how I can do this? I tried using "replace()" but that din't really work? :(

mudituppal
welcome to shbcf.ru