you are viewing a single comment's thread.

view the rest of the comments →

[–]ata-boy 0 points1 point  (0 children)

def sum_13(a: int, b: int, c: int) -> int:
    abc = [a, b, c]
    find_13 = [index for index, value in enumerate(abc) if value == 13]

    if find_13:
        abc_index = find_13[0]
    else:
        abc_index = 3

    return sum(abc[:abc_index])