[Solved] Input from a file [closed]

[ad_1]

You can read all data at a moment:

with open(input_file, 'r', encoding='utf-8') as f:
    data = f.read()

You can read all data line-by-line:

with open(input_file, 'r', encoding='utf-8') as f:
    for line in f.readlines():
        # todo smth

[ad_2]

solved Input from a file [closed]