Advertisement
here2share

# b_product.py

Dec 8th, 2021
1,178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. # b_product.py
  2.  
  3. from itertools import product
  4.  
  5. alpha = '123'
  6. for s in product(alpha, repeat=3):
  7.     output = ''.join(s)
  8.     print output,
  9.  
  10. '''111 112 113 121 122 123 131 132 133 211 212 213 221 222 223 231 232 233 311 312 313 321 322 323 331 332 333'''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement