def splitpasswd(user):
 (user, delim, passwd) = user.partition(':')
 return (user, (passwd if delim else None))

def splitpasswd ( user ) : ( user , delim , passwd ) = user . partition ( ':' ) return ( user , ( passwd if delim else None ) )
splitpasswd -> user .