Your question is String and Python Coding Practice. 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.
A Syapse patient-event label may contain repeated characters. Given a string s, return the first character encountered during a left-to-right scan that has already appeared. If no character repeats, return None.
The result is based on the first repeated occurrence, not the character with the earliest original position. For example, in "abccba", return "c" because the second c is encountered before the second a or b.
Implement first_repeating_character(s), where s is a string and the return value is either a one-character string or None. Treat uppercase and lowercase letters as different characters, and count spaces and punctuation as valid characters.
def first_repeating_character(s):