I was doing the Cisco Python Essentials training and I noticed an oddity with rstrip:
print("cisco.com".rstrip("com")) produces "cisco." as would be expected
but:
print("cisco.com".rstrip(".com")) produces "cis" not "cisco" as I was expecting.
Why is this?
Thanks