diff --git a/4 Digit Number Combinations.py b/4 Digit Number Combinations.py new file mode 100644 index 00000000000..6ac4ab93327 --- /dev/null +++ b/4 Digit Number Combinations.py @@ -0,0 +1,22 @@ +#ALL the combinations of 4 digit combo +def FourDigitCombinations(): + numbers=[] + for code in range(10000): + if code<=9: + code=str(code) + numbers.append(code.zfill(4)) + elif code>=10 and code<=99: + code=str(code) + numbers.append(code.zfill(4)) + elif code>=100 and code<=999: + code=str(code) + numbers.append(code.zfill(4)) + else: + numbers.append(str(code)) + + for i in numbers: + print i, + + pass + +