On 13 fév, 21:24, 8 Dihedral wrote:
> Rick Johnson於 2013年2月14日星期四UTC+8上午12時34分11秒寫道:
>
>
>
>
>
>
>
> > On Wednesday, February 13, 2013 1:10:14 AM UTC-6, jmfauth wrote:
>
> > > >>> d = {ord('a'): 'A', ord('b'): '2', ord('c'): 'C'}
>
> > > >>> 'abcdefgabc'.translate(d)
>
> > > 'A2CdefgA2C'
>
> >
Rick Johnson於 2013年2月14日星期四UTC+8上午12時34分11秒寫道:
> On Wednesday, February 13, 2013 1:10:14 AM UTC-6, jmfauth wrote:
>
> >
>
> > >>> d = {ord('a'): 'A', ord('b'): '2', ord('c'): 'C'}
>
> > >>> 'abcdefgabc'.translate(d)
>
> > 'A2CdefgA2C'
>
> > >>>
>
> > >>>
>
> > >>> def jmTranslate(s, table):
On Wed, 13 Feb 2013 16:55:36 +, Mark Lawrence wrote:
> On 13/02/2013 16:34, Rick Johnson wrote:
>> On Wednesday, February 13, 2013 1:10:14 AM UTC-6, jmfauth wrote:
>>>
>> d = {ord('a'): 'A', ord('b'): '2', ord('c'): 'C'}
>> 'abcdefgabc'.translate(d)
>>> 'A2CdefgA2C'
>>
>>
>
On 13/02/2013 16:34, Rick Johnson wrote:
On Wednesday, February 13, 2013 1:10:14 AM UTC-6, jmfauth wrote:
d = {ord('a'): 'A', ord('b'): '2', ord('c'): 'C'}
'abcdefgabc'.translate(d)
'A2CdefgA2C'
def jmTranslate(s, table):
... table = {ord(k):table[k] for k in table}
... return s.t
On Wednesday, February 13, 2013 1:10:14 AM UTC-6, jmfauth wrote:
>
> >>> d = {ord('a'): 'A', ord('b'): '2', ord('c'): 'C'}
> >>> 'abcdefgabc'.translate(d)
> 'A2CdefgA2C'
> >>>
> >>>
> >>> def jmTranslate(s, table):
> ... table = {ord(k):table[k] for k in table}
> ... return s.translate(tabl
On 13 fév, 06:26, Rick Johnson wrote:
> On Tuesday, February 12, 2013 10:44:09 PM UTC-6, Rick Johnson wrote:
> >
> > REFERENCES:
> >
> > [1]: Should string.replace handle list
On Tuesday, February 12, 2013 10:44:09 PM UTC-6, Rick Johnson wrote:
>
> REFERENCES:
>
> [1]: Should string.replace handle list, tuple and dict
> arguments in addition to stri
On Saturday, February 9, 2013 5:04:18 AM UTC-6, Joshua Robinson wrote:
> Hi Monte-Pythons,
>
> x = "this is a simple : text: that has colon"
> s = x.replace(string.punctuation, ""); OR
> s = x.replace(string.punctuation, "");
> print x # 'this is a simple : text: that has colon'
>
> # The col
On Sunday, February 10, 2013 4:36:53 AM UTC-6, Johannes Bauer wrote:
> On 09.02.2013 12:04, Joshua Robinson wrote:
>
> > Hi *Monte-Pythons*,
>
> >
>
> > x = "this is a simple : text: that has colon"
>
> > s = x.replace(string.punctuation, ""); OR
>
> > s = x.replace(string.punctuation, "");
On 09.02.2013 12:04, Joshua Robinson wrote:
> Hi *Monte-Pythons*,
>
> x = "this is a simple : text: that has colon"
> s = x.replace(string.punctuation, ""); OR
> s = x.replace(string.punctuation, "");
> print x # 'this is a simple : text: that has colon'
> # The colon is still in the text
On Sat, Feb 9, 2013 at 10:04 PM, Joshua Robinson
wrote:
> Hi Monte-Pythons,
>
> x = "this is a simple : text: that has colon"
> s = x.replace(string.punctuation, ""); OR
> s = x.replace(string.punctuation, "");
> print x # 'this is a simple : text: that has colon'
> # The colon is still in the
Hi *Monte-Pythons*,
x = "this is a simple : text: that has colon"
s = x.replace(string.punctuation, ""); OR
s = x.replace(string.punctuation, "");
print x # 'this is a simple : text: that has colon'
# The colon is still in the text
Is this a bug or am I doing something wrong ?
Py.Version
12 matches
Mail list logo