We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0167bbd + 8992a85 commit c88655dCopy full SHA for c88655d
4 Digit Number Combinations.py
@@ -1,22 +1,7 @@
1
-#ALL the combinations of 4 digit combo
+# ALL the combinations of 4 digit combo
2
def FourDigitCombinations():
3
numbers=[]
4
for code in range(10000):
5
- if code<=9:
6
- code=str(code)
7
- numbers.append(code.zfill(4))
8
- elif code>=10 and code<=99:
9
10
11
- elif code>=100 and code<=999:
12
13
14
- else:
15
- numbers.append(str(code))
16
-
17
- for i in numbers:
18
- print i,
19
20
- pass
21
22
+ code=str(code).zfill(4)
+ print code,
+ numbers.append(code)
0 commit comments