Closed
Description
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:
$ python a.py
b
b
bc
But with LPython it prints:
$ lpython a.py && ./a.out
bcdefg
cdefg
defg
We have to fix it.
Metadata
Metadata
Assignees
Labels
No labels