I'm pretty new to this so sorry if this is a dumb question. I'm trying to sort some data. Here's a rank of countries by GDP for example, that I'd like to find percentages of, add up certain amounts top down (like a CDF), etc. How would I make a python script to go through the "spaces" and tabs. I'd like to also export it to an excel file.
1 European Union $ 15,970,000,000,000
2 United States $ 15,940,000,000,000
3 China $ 12,610,000,000,000
4 India $ 4,761,000,000,000
5 Japan $ 4,704,000,000,000
6 Germany $ 3,250,000,000,000
7 Russia $ 2,555,000,000,000
8 Brazil $ 2,394,000,000,000
9 United Kingdom $ 2,375,000,000,000
10 France $ 2,291,000,000,000
11 Italy $ 1,863,000,000,000
12 Mexico $ 1,788,000,000,000
13 Korea, South $ 1,640,000,000,000
14 Canada $ 1,513,000,000,000
15 Spain $ 1,434,000,000,000
16 Indonesia $ 1,237,000,000,000
17 Turkey $ 1,142,000,000,000
18 Iran $ 1,016,000,000,000
19 Australia $ 986,700,000,000
20 Saudi Arabia $ 921,700,000,000
There are also variations in formatting?