0 out of 464 challenges solved
Write a Python function to find the first non-repeated character in a given string.
1. The function should take a single string as input.
2. It should return the first character in the string that does not repeat.
3. If all characters are repeated, return `None`.
#### Example Usage
```python [main.nopy]
first_non_repeating_character("abcabc") # Output: None
first_non_repeating_character("abc") # Output: "a"
first_non_repeating_character("ababc") # Output: "c"
```def first_non_repeating_character(input_string):
"""
Find the first non-repeated character in the given string.
Args:
input_string (str): The string to analyze.
Returns:
str or None: The first non-repeated character, or None if all characters are repeated.
"""
# Initialize data structures to track character counts and order
# Implement the logic to find the first non-repeated character
pass