__author__ = 'k22li' a = 'www.baidu.com' print a.strip('wcom.').upper() print a.lstrip('w.') print a.rstrip('com.')