python print raw string 1

python print raw string

>>> print(repr('abc 123 \n'))
'abc 123 \n'

Here is what the above code is Doing:
1. The repr() function is called with the string ‘abc 123 \n’ as the argument.
2. The repr() function returns the string ‘abc 123 \n’.
3. The print() function is called with the string ‘abc 123 \n’ as the argument.
4. The print() function prints the string ‘abc 123 \n’.

Similar Posts