that's fine. more generally, you can define something like:
from collections import Counter
from random import randint
def weighted_random(pairs):
total = sum(pair[0] for pair in pairs)
r = randint(1, total)
for (weight, value) in pairs:
r -= weight
if r <= 0: return value
results = Counter(weighted_random([(1,'a'),(1,'b'),(18,'c')])
for _ in range(20000))
print(results)
which gives
Counter({'c': 17954, 'b': 1039, 'a': 1007})
which is as close to 18:1:1 as you can expect.