Dec-05-2022, 09:06 PM
okay, another try (that doesn't work):
with open("/home/tal/PycharmProjects/pythonProject2/input.txt", "r") as file: for line in file: line_total = 0 if line != "\n": line_total += int(line) else: print(line_total)you know, when i read code of other people - it makes perfect sense to me, but when i try to write a code of my own - it seems like i just don't know how to do it...