#!/usr/bin/env python3

import itertools

# Constants

NUMBERS = range(0, 10)

# Main Execution

def main():
    count = 0
    for length in range(0, len(NUMBERS) + 1):
        for subset in itertools.combinations(NUMBERS, length):
            if sum(subset) % 3 == 0:
                count += 1

    print(count)

if __name__ == '__main__':
    main()

[((14, 22, 14, 61), 'itertools.combinations', 'itertools.combinations', ({(14, 45, 14, 52): 'NUMBERS', (14, 54, 14, 60): 'length'}, {}), '(NUMBERS, length)', False, 'import itertools\n')]