This function for selection some string from a file doesn't work for some reason
This is the code: file = open('new_file.txt', 'r') inpt = file.read() def sort(file): i = 1 # This only for testing!!! num = str(i) + "." num_find = file.find(num) start = file.find(num) a = file.find("A)", num_find) b = file.find("B)", num_find) question = file[start:a] answer = file[a:b] print('Question is: ', question 'Answer is ', answer) sort(inpt) And the file looks like this: 1. ICT stands for: А) Information and Communication Technology B) Integra Common Terminology C) International Communication Technology D) Inter connected Terminals E) Interactive Communication Technology 2. Which of the following is the appropriate definition of Information Technology? A) Information Technology refers to the use of hardware and software for storage, retrieval, processing and distributing information of many kinds. B) Information Technology refers to the use of hardware and software for distribution of useful information. C) Information Technology refers to the use of principles of Physical sciences and Social sciences for processing of information of many kinds. D) Information Technology refers to the use of hardware and software for processing information. E) Information Technology refers to greatly impacted and enhanced global socialization and interactions.