Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import *
- count = 0
- for p in product('ABCX', repeat=5):
- x = ''.join(p)
- if x.count('X') == 0 or x[-1] == 'X':
- count += 1
- print(x)
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement