interplane.Get Omega
Read in your language

omega-rosetta

aien-dev/omega-rosetta

Brought by drakestapleton

branch main Branches Tags History

omega-rosetta / tasks / substring / oracle.py

9 lines · 268 bytes Raw Blame History
1# Independent reference for "Substring" (Python 3, standard library only).
2# expected.txt is this program's stdout; omc never produced it.
3s = "abcdefgh"
4n, m = 2, 3
5print(s[n:n + m])
6print(s[n:])
7print(s[:-1])
8print(s[s.index("d"):][:m])
9print(s[s.index("cd"):][:m])