Advertisement
Farz0l1x

Untitled

Apr 17th, 2024
575
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. from itertools import *
  2. count = 0
  3. for p in product('ABCX', repeat=5):
  4.     x = ''.join(p)
  5.     if x.count('X') == 0 or x[-1] == 'X':
  6.         count += 1
  7.         print(x)
  8. print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement