ReXX Style translate() function for strings ?

Ype Kingma ykingma at accessforall.nl
Thu Nov 1 14:18:28 EST 2001


Ype Kingma wrote:

> A more python-like way of changing the date format of a string could be:
> 
> new_date = ''.join(old_date[4:5],'/',old_date[6:7],'/',old_date[0:3])
> 
This might even work:

new_date = ''.join((old_date[4:5],'/',old_date[6:7],'/',old_date[0:3]))



More information about the Python-list mailing list