s = ' Hello, World! This is a python string. \n\n'
• s.strip() -> 'Hello, World! This is a python string.'
• s.split() -> ['Hello,', 'World!', 'This', 'is', 'a', 'python', 'string.']
• atoi(), atof()
• s.find('a') -> 25, s.find('P') -> -1
• s.index('a') -> 25, s.index('P') -> ValueError: substring not found
沒有留言:
張貼留言