Which statements prevent the escape sequence interpretation?
col1\tcol2\tcol3\t
escape'col\tcol2\tcol3\t'
subtext'col\tcol2\tcol3\t'
r'col\tcol2\tcol3\t'
Answers
Answered by
4
The correct option is col1\tcol2\tcol3\t
Explanation:
- This is a Python script that accepts file paths as strings, works on them and then passed to sub process.
- Open() for execution. This script is used for Unix and Windows file paths and almost run on both systems.
- If we give a Windows path that accidentally contains an escape character, Python will translate the embedded \b as backspace.
- There's no process to indicate a string variable as a raw string.
- The 'r' modifier works for string constants only.
- The string is:
- winpath = "C:\Users\Administrator\bin" winpath = winpath.replace('\b','\\b') winpathlist = winpath.split('\\')
- By adding additional calls to winpath.replace() to handle the other escapes we get -- \a, \f, \n, \r, \t, \v -- but not \x.
Answered by
0
Answer:
r'col\tcol2\tcol3\t'
Explanation:
The right answer for which statements prevent the escape sequence interpretation
Similar questions