I wish colour some selected text within the verbatim environment. These texts may not occupy a whole line, but rather be a small part of a line.
An illustration is given below. Say for example, in the first line of this code,
import are to be written in purple colour, while the rest of the line is in usual black colour. I am using
fancyvrb package, but cannot figure out how to do this. Can someone help?