The following code:
def f():
s: str
s = "abcdefg"
print(s[1]) # prints "bcdefg", but should print "b"
print(s[1:2]) # prints "cdefg", but should print "b"
print(s[1:3]) # prints "defg", but should print "bc"
f()
Prints (correctly) using CPython:
But with LPython it prints:
$ lpython a.py && ./a.out
bcdefg
cdefg
defg
We have to fix it.
The following code:
Prints (correctly) using CPython:
But with LPython it prints:
We have to fix it.