Skip to content

Commit 8a0b96d

Browse files
committed
Modify format based on pylint
1 parent 97eb1f2 commit 8a0b96d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

four_digit_num_combination.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1+
""" small script to learn how to print out all 4-digit num"""
2+
13
# ALL the combinations of 4 digit combo
2-
def FourDigitCombinations():
3-
numbers=[]
4+
def four_digit_combinations():
5+
""" print out all 4-digit numbers in old way"""
6+
numbers = []
47
for code in range(10000):
5-
code=str(code).zfill(4)
8+
code = str(code).zfill(4)
69
print(code)
710
numbers.append(code)
811

912
# Same as above but more pythonic
10-
def oneLineCombinations():
13+
def one_line_combinations():
1114
""" print out all 4-digit numbers """
1215
numbers = [str(i).zfill(4) for i in range(10000)]
1316
print(numbers)

0 commit comments

Comments
 (0)