Created
January 20, 2015 07:13
-
-
Save masters3d/7427a1f7de4353f7bf71 to your computer and use it in GitHub Desktop.
problems compare
This file contains 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 | |
import urllib2 | |
pythonParsedList = json.load(urllib2.urlopen('https://raw.githubusercontent.com/exercism/xpython/master/config.json')) | |
swiftParsedList = json.load(urllib2.urlopen('https://raw.githubusercontent.com/exercism/xswift/master/config.json')) | |
haskellParsedList = json.load(urllib2.urlopen('https://raw.githubusercontent.com/exercism/xhaskell/master/config.json')) | |
csharpParsedList = json.load(urllib2.urlopen('https://raw.githubusercontent.com/exercism/xcsharp/master/config.json')) | |
#Python | |
pythonProblems = pythonParsedList['problems'] | |
swiftProblems = swiftParsedList['problems'] | |
diffProblemsSwiftPython = [item for item in pythonProblems if item not in swiftProblems] | |
commonProblemsSwiftPython = [item for item in pythonProblems if item in swiftProblems] | |
diffCommonProblemsSwiftPython = [item for item in swiftProblems if item not in commonProblemsSwiftPython] | |
#Haskell | |
haskellProblems = haskellParsedList ['problems'] | |
pythonProblemsDeprecated = pythonParsedList['deprecated'] | |
deprecatedPythonHaskell = [item for item in pythonProblemsDeprecated if item not in haskellProblems] | |
#Csharp | |
csharpProblems = csharpParsedList['problems'] | |
diffProblemsSwiftCsharp = [item for item in csharpProblems if item not in swiftProblems] | |
commonProblemsSwiftCsharp = [item for item in csharpProblems if item in swiftProblems] | |
diffCommonProblemsSwiftCsharp = [item for item in swiftProblems if item not in commonProblemsSwiftCsharp] | |
newListToPrint = [] | |
#for each in enumerate(diffProblemsSwiftCsharp) : | |
#print(each) | |
for each in diffProblemsSwiftCsharp : | |
newListToPrint.append([csharpProblems.index(each), each]) | |
print newListToPrint | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment