Skip to content

Instantly share code, notes, and snippets.

@Maxghp
Created October 24, 2016 11:04
Show Gist options
  • Save Maxghp/9711b926fbfc0e8468b636c0bd2063c4 to your computer and use it in GitHub Desktop.
Save Maxghp/9711b926fbfc0e8468b636c0bd2063c4 to your computer and use it in GitHub Desktop.
Python nested cycle
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)
@Maxghp
Copy link
Author

Maxghp commented Oct 24, 2016

nested cycle for parsing json file with multidimensional array

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment