easy_unpack   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A easy_unpack() 0 2 1
1
def easy_unpack(elements: tuple) -> tuple:
2
    return elements[0], elements[2], elements[-2]
3
4
5
if __name__ == '__main__':
6
    # These "asserts" using only for self-checking
7
    # and not necessary for auto-testing
8
    assert easy_unpack((1, 2, 3, 4, 5, 6, 7, 9)) == (1, 3, 7)
9
    assert easy_unpack((1, 1, 1, 1)) == (1, 1, 1)
10
    assert easy_unpack((6, 3, 7)) == (6, 7, 3)
11
    print('Done! Go Check!')
12