Copying Wikipedia Data from Table into Dictionary
I was wondering if there was a simple way to copy data from a table in Wikipedia and put it into a variable such as a list of tuples or a dictionary or something like that.
To give a sense of what I'm talking about, it's the table on [this Wikipedia page](https://en.wikipedia.org/wiki/Visa_requirements_for_United_States_citizens#Visa_requirements), but want to include this for all—or at least many—countries, e.g.:
visareqs = {
# "Country Name" : [list of visa-free countries]
"Afghanistan" : ["Cape Verde", "Comoros", "Dominica",], #etc...
# etc...
"United States" : ["Albania", "Andorra", "Antigua and Barbuda"], # etc...
# etc...
"Zimbabwe" : ["Angola", "Bahamas", "Barbados"] #etc...
}
This data is easy to see visually in the tables on Wikipedia, but feel like there's got to be a faster way to copy this data into my code other than doing it manually.
For context, I've taken two college-level computer science courses, one as an intro to Python for those potentially interested in majoring in CS (I decided not to), and one as an intro to Computational Linguistics, also taught in Python, where we used things like regexes, finite-state machines, and dictionaries.