Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Population_Data # A module we wrote
- # The first year in the population data
- YEAR_1 = 1950
- # Open the file
- file_obj = open('USPopulation.txt', 'r')
- # This statement creates a list with all the lines in the file where the
- # entries are strings.
- population_list = file_obj.read().splitlines()
- # So we convert the strings to integers, one-by-one.
- for i in range(len(population_list)):
- population_list[i] = int(population_list[i])
- Population_Data.display_population_data(population_list, YEAR_1)
- # Close the file
- file_obj.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement