You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Realized this while working on #1589
Escape sequences are treated as 2 characters of a string in Lpython unlike in python. Although it is a small block and the if condition can be modified accordingly for the pull request, it should be corrected.
A minimal example is this -
def f():
print(len("\t")) # Single character for tab space
print(len("\n")) # Single character for new line
print(len("\0")) # Single character for null
f()
(lp) C:\Users\kunni\lpython>python try.py
1
1
1
(lp) C:\Users\kunni\lpython>src\bin\lpython try.py
2
2
2