Il 15/03/2011 09:10, yqyq22 ha scritto:
I would like to put an alphanumeric string like this one
EE472A86441AF2E629DE360 in a list, then iterate inside the entire
string lenght and change each digit with a random digit.
Do u have some suggestion? thanks a lot
hi
I'm not an experienced python
Il 09/11/2010 03:18, Lawrence D'Oliveiro ha scritto:
How exactly does
a.f(b, c)
save time over
f(a, b, c)
unfortunately in real world you have:
objId = objId.method(args)
vs.
objId = moduleName.method(objId, args)
I know you can use "from moduleName import *", but IMHO that pro
Il 07/11/2010 07:41, Chris Rebert wrote:
You could subclass UserString instead of str; all of UserString's
methods seem to ensure that instances of the subclass rather than just
plain strs or UserStrings are returned. See
http://docs.python.org/library/userdict.html#UserString.UserString
I'll
Hi,
I'd like to know what is the best way to subclass str
I need to add some new methods and that each method (both new and str
ones) return my new type
For instance I've seen I can do:
class mystr(str):
def between(self, start, end):
i = self.index(start) + len(start)
j = se