The specific code is as follows
input = "Please convert 899999999999 using AaBbCcDdEeFfGgHhIiJjKkaaaaLlaaa "
output = input.strip('Please convert')
print(output)
899999999999 using AaBbCcDdEeFfGgHhIiJjKkaaaaL
Can anyone give an explanation?
The specific code is as follows
input = "Please convert 899999999999 using AaBbCcDdEeFfGgHhIiJjKkaaaaLlaaa "
output = input.strip('Please convert')
print(output)
899999999999 using AaBbCcDdEeFfGgHhIiJjKkaaaaL
Can anyone give an explanation?
Copyright © 2021 Jogjafile Inc.
strip()removes all lead and end characters taken from the given string, not the literal input providedhttps://docs.python.org/3/library/stdtypes.html#str.strip
In other words,
'acelnorstvP 'would yield the same output