- >>> s="www.google.com"
- >>> s
- 'www.google.com'
- >>> s.split('.')
- ['www', 'google', 'com']
- >>> s.split('.',1)
- ['www', 'google.com']
- >>> s.split('.')[1]
- 'google'
- >>> s.split('.',-1)
- ['www', 'google', 'com']
- >>> s1,s2,s3=s.split('.',2)
- >>> s1
- 'www'
- >>> s2
- 'google'
- >>> s3
- 'com'
- >>> s=''
- >>> s
- 'call
me
baby'
- >>> print s
- call
- me
- baby
- >>> s.split('
')
- ['call', 'me', 'baby']
- >>> s="hello world!<[www.google.com]>byebye"
- >>> s
- 'hello world!<[www.google.com]>byebye'
- >>> s.split('[')[1].split(']')[0]
- 'www.google.com'
- >>> s.split('[')[1].split(']')[0].split('.')
- ['www', 'google', 'com']
Powers a lot like real estate.Its all about location, location, location.The closer you are to the source,the higher your property value.