The below code prints the emoji like, this :
print('\U0001F602')
print('{}'.format('\U0001F602'))
However, If I use \
like the below, it prints \U0001F602
print('\{}'.format('U0001F602'))
Why the print('\{}'.format())
retunrs \\
, not a escape character, which is \
?
I have been checking this and searched in Google, but couldn't find the proper answer.