import re n = input("Enter Something: ") if re.search('d', n): print("Number found") else: print("No number found.") c:UsersH.vscodecliTesting1main.py:3: SyntaxWarning: invalid escape sequence 'd' if re.search('d', n): Enter Something: Hello123 Number found
Why the error is shown. Although the code works fine. What is SyntaxWarning
submitted by /u/Own_Construction_965
[link] [comments]
r/learnpython import re n = input(“Enter Something: “) if re.search(‘d’, n): print(“Number found”) else: print(“No number found.”) c:UsersH.vscodecliTesting1main.py:3: SyntaxWarning: invalid escape sequence ‘d’ if re.search(‘d’, n): Enter Something: Hello123 Number found Why the error is shown. Although the code works fine. What is SyntaxWarning submitted by /u/Own_Construction_965 [link] [comments]
import re n = input("Enter Something: ") if re.search('d', n): print("Number found") else: print("No number found.") c:UsersH.vscodecliTesting1main.py:3: SyntaxWarning: invalid escape sequence 'd' if re.search('d', n): Enter Something: Hello123 Number found
Why the error is shown. Although the code works fine. What is SyntaxWarning
submitted by /u/Own_Construction_965
[link] [comments]