If you work with strings in your Python scripts and you're writing obscure logic to process them, then you need to look into ...
(C1) The output should contain only those NxN patterns of pixels that are present in the input. (Weak C2) Distribution of NxN patterns in the input should be similar to the distribution of NxN ...