Jun-15-2017, 09:30 AM
You won't go very far if you don't try to understand what is going on in the code.
The code above use sets, on which you can perform intersection and difference.
There is one trick in the code above, you can construct a set from a sequence, and an open file object being a sequence of all the lines,
The code above use sets, on which you can perform intersection and difference.
There is one trick in the code above, you can construct a set from a sequence, and an open file object being a sequence of all the lines,
set(file)
creates a set with every line in the file. However, these lines include or not the \n
delimiter so reading them directly in the set without sanitizing them first can be dangerous. The output file is also created with the hope that the line delimiters are all there already.
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Your one-stop place for all your GIMP needs: gimp-forum.net