I recommend to use Python's fractions module for probability calculations.
Hence forth your solution could be as:
from fractions import Fraction
probs = ["1/9", "1/9", "1/9", "1/9", "1/9", "1/9", "1/9", "1/9", "1/9"]
# rather than integer convert it to Fraction, or simply use fractions only from beginning.
probs = [Fraction(i) for i in probs] # convert like this
# or use directly as below:
probs = [Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9)]
I believe that in probability you have to perform operation of mathematics operation, so you could do as below:
In [12]: print(probs)
[Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9), Fraction(1, 9)]
In [13]: i = 3
In [15]: new_probs = [Fraction(3, 9) if prob==i else Fraction(8, 9) for prob in probs]
In [16]: print(new_probs)
[Fraction(8, 9), Fraction(8, 9), Fraction(8, 9), Fraction(8, 9), Fraction(8, 9), Fraction(8, 9), Fraction(8, 9), Fraction(8, 9), Fraction(8, 9)]
Or let's say you are actually performing operation of 1 - Probability
and multiplying 3 to match, then it would still work with fraction with operation as you expect to be perform with probability functions:
In [17]: new_probs = [3*prob if prob==i else 1-prob for prob in probs]
In [18]: print(new_probs)
[Fraction(8, 9), Fraction(8, 9), Fraction(8, 9), Fraction(2, 3), Fraction(8, 9), Fraction(8, 9), Fraction(8, 9), Fraction(8, 9), Fraction(8, 9)]