how to write a function like strip in python code example
Example: python strip
txt = " test "
txt.strip()
#Output: "test"
txt.lstrip()
#Output: "test "
txt.rstrip()
#Output: " test"
txt = " test "
txt.strip()
#Output: "test"
txt.lstrip()
#Output: "test "
txt.rstrip()
#Output: " test"