Created
October 24, 2016 11:04
-
-
Save Maxghp/9711b926fbfc0e8468b636c0bd2063c4 to your computer and use it in GitHub Desktop.
Python nested cycle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from pprint import pprint | |
from inspect import getmembers | |
with open('items.json') as data_file: | |
links = json.load(data_file) | |
separate_links = [] | |
for link in links: | |
separate_links.append(link) | |
result = [str("http://www.investopedia.com" + url) for urls in separate_links for url in urls['link']] | |
pprint(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nested cycle for parsing json file with multidimensional array