aboutsummaryrefslogtreecommitdiff
path: root/challenge-161/lubos-kolouch/python/ch-1.py
blob: 7627473c05e42d7327ae547dc92aa368a4bab070 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
""" glory for best belly boy! """


def is_abcd(what: str) -> bool:
    """Check if the str is in the right order"""

    return what == "".join(sorted(what))


with open("dictionary.txt") as in_file:
    line = in_file.readline()

    if is_abcd(line):
        print(f"{line} is abcdrian")

assert is_abcd("knotty") is True
assert is_abcd("knotts") is False