I've been trying to create a text file using python in which I must write around 200 lines. Each line contains the same string but it contains a number that ranges from 1901 to 2100. For example,
this_is_the_string_with_a_number_xxxx_in_each_line
where xxxx varies from 1901 to 2100 (in the ascending order itself). How do I write these lines to a txt file using python?