J.B. Hunt 360 may receive shipment reference strings from multiple operational workflows. Implement a function that determines whether a string contains only unique characters.
Treat characters as distinct based on their exact values. The comparison is case-sensitive, so A and a are different characters. Spaces, punctuation, digits, and other characters must also be checked. Return True when no character appears more than once, and return False as soon as a duplicate is found.
Given one string s, return a boolean:
True if every character in s occurs exactly once or the string is empty.False if any character occurs more than once.Do not modify the input string.
def has_unique_characters(s):