MCPcopy Index your code
hub / github.com/jwasham/practice-python / main

Function main

experiments/number-test.py:3–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1
2
3def main():
4 input_file = "numbers.txt"
5 output_file = "numbers-mult.txt"
6
7 output = []
8
9 with open(input_file, "r") as input_handle:
10 for line_number, line in enumerate(input_handle, 1):
11 output.append(line_number * int(line.rstrip()))
12
13 output_handle = open(output_file, "w")
14 output_handle.write('\n'.join(str(n) for n in output))
15
16
17if __name__ == "__main__":

Callers 1

number-test.pyFile · 0.70

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected