Your question is Reverse String and Unique Values. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
For a Tata Consultancy Services North America data-validation utility, process a string and a Python dictionary in one function. Return the string reversed and the dictionary values deduplicated while preserving the order of their first occurrence.
Implement reverse_and_unique_values(text, data).
text is a string. Return its characters in reverse order.data is a dictionary whose keys and values are strings. Examine values in normal dictionary iteration order.reversed_text, containing the reversed string, and unique_values, containing a list of distinct values in first-seen order.def reverse_and_unique_values(text, data):