[Tutor] RegEx to search for the '$' symbol

Kent Johnson kent37 at tds.net
Wed Jun 11 13:45:48 CEST 2008

On Wed, Jun 11, 2008 at 5:35 AM, qsqgeekyogdty at tiscali.co.uk
<qsqgeekyogdty at tiscali.co.uk> wrote:
> Hi,
> Silly question but how do you use python's re module to find
> dictionary items that contain the '$' symbol.

There is no need to use re for this.
[ v for v in d.values() if '$' in v ]
will give you a list of all values containing '$'.


More information about the Tutor mailing list