interplane.Get Omega
Read in your language

omega-rosetta

aien-dev/omega-rosetta

Brought by drakestapleton

branch main Branches Tags History

omega-rosetta / tasks / string-comparison / oracle.py

5 lines · 383 bytes Raw Blame History
1# Independent reference for "String comparison" (Python 3, standard library only).
2# expected.txt is this program's stdout; omc never produced it.
3yn = {True: "yes", False: "no"}
4for a, b in [("alpha", "beta"), ("Hello", "hello"), ("abc", "abcd"), ("abcd", "abc")]:
5 print(f"{a} {b} eq={yn[a == b]} lt={yn[a < b]} gt={yn[a > b]} equal-ignoring-case={yn[a.lower() == b.lower()]}")