This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import itertools | |
| def main(): | |
| digits = input('Enter numbers: ').replace(' ', '') | |
| length = int(input('Enter passcode length: ')) | |
| def contains_all_digits(combination): | |
| keep = True | |
| for digit in digits: | |
| if digit not in combination: | |
| keep = False |