input: def swap_to_get_smallest_string(s: str) -> str:
      """
      Given a string s containing only digits, return the 
      lexicographically smallest string
      that can be obtained after swapping adjacent digits in s with the same parity at most once.
  
      Digits have the same parity if both are odd or both are even. For example, 5 and 9, as well as 2 and 4, have the same parity, while 6 and 9 do not.
  
      Examples:
      >>> s = "45320"
      "43520"
      >>> s = "001"
      "001"
  
      Constraints:
      2 <= s.length <= 100
      s consists only of digits.
      """
  
output: 
      smallest = s
      s = list(s)
      for i in range(len(s) - 1):
          if int(s[i]) % 2 == int(s[i + 1]) % 2:
              s[i], s[i + 1] = s[i + 1], s[i]
              candidate = ''.join(s)
              if candidate < smallest:
                  smallest = candidate
              s[i], s[i + 1] = s[i + 1], s[i]
      return smallest
  