strings.largest_smallest_words ============================== .. py:module:: strings.largest_smallest_words Attributes ---------- .. autoapisummary:: strings.largest_smallest_words.input_string Functions --------- .. autoapisummary:: strings.largest_smallest_words.find_smallest_and_largest_words Module Contents --------------- .. py:function:: find_smallest_and_largest_words(input_string: str) -> tuple Find the smallest and largest words in a given input string based on their length. Args: input_string (str): The input string to analyze. Returns: tuple: A tuple containing the smallest and largest words found. If no words are found, both values in the tuple will be None. Examples: >>> find_smallest_and_largest_words("My name is abc") ('My', 'name') >>> find_smallest_and_largest_words("Hello guys") ('guys', 'Hello') >>> find_smallest_and_largest_words("OnlyOneWord") ('OnlyOneWord', 'OnlyOneWord') .. py:data:: input_string