Re: [Tutor] How to substitute an element of a list as a pattern forre.compile()

2005-01-01 Thread Kent Johnson
Jacob S. wrote: Rich needs to make the % formatting "%d"%x instead of "%s"%x because he showed that x is an integer not a string. Actually %s formatting is very flexible and forgiving, it outputs str(x) whatever x is. For example: >>> for x in ['string', 10, True, [1,2,3] ]: ... print '%s'

Re: [Tutor] How to substitute an element of a list as a pattern forre.compile()

2005-01-01 Thread Jacob S.
Nobody explicitly mentioned that you're trying to make a pattern from an integer and not a string, which, I believe is required. Also, Rich needs to make the % formatting "%d"%x instead of "%s"%x because he showed that x is an integer not a string. There's my two bits. Jacob Schmidt > Hi Gro