Style question

Peter Otten __peter__ at web.de
Sat Dec 13 06:37:46 EST 2003


Kamus of Kadizhar wrote:

> I have the following line:
> 
> remoteMD5hash = Socket.recv(256)
> 
> But what I really want is remoteMD5hash.strip()
> 
> What's the best way to say that on one line?
> 
> remoteKD5hash = string.strip(Socket.recv(256)) ?
> 
> Or something better?

remoteMD5hash = Socket.recv(256).strip()

Peter




More information about the Python-list mailing list