0

Str.replace not better than re.sub?

if i know well, replace do the same, but faster. is it true or I missed somethin?

23rd Aug 2018, 3:32 AM
Hanusch
Hanusch - avatar
1 Resposta
+ 1
well str.replace works only on a specified string, while re.sub works with regular expressions allowing for more flexibility
23rd Aug 2018, 8:15 AM
hinanawi
hinanawi - avatar