[Solved] Python regex not printing contents in new list
You are looping over individual characters, not over lines: >>> maxline=”i have a Prof.John and As Maria a bike” >>> for line in maxline: … print line … i h a v e # …. etc. These individual characters don’t match your expressions. Change maxline to be a list; perhaps by splitting it on newlines … Read more