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 Control.Monad | |
sep [] = [] | |
sep xs = word : sep ((drop ((length word) + 1) xs)) | |
where word = takeWhile (/= '/') xs | |
main = do | |
xs <- getLine | |
putStrLn "" | |
mapM_ (\x -> putStrLn x) (sep xs) | |
putStrLn "" |
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
def compare(correctList, newList, scope): | |
""" | |
A method to compare two list which are not necessarily the same but should be regarded as the same. | |
The 2 input lists are supposed to have the same items and the same length, also no duplicates are allowed. | |
Parameters | |
---------- | |
correctList: the list where the new list is compared to | |
newList: the list which is compared to the correct list | |
scope: the number of places before and behind an item |