Beginning Python

Starting with creating our data file data.txt:

data.txt
12
54
7
332
54
1
0

We have changed just one line so that it now has * 10 rather than + 17:

file.py
with open("data.txt") as f:
    for line in f:
        number = int(line)
        new_number = number * 10
        print(new_number)
$
python file.py
120
540
70
3320
540
10
0