Not really. Unlike the monty hall problem, sleeping beauty receives no additional information. The thought experiment was originally brought up to illustrate how a perfectly rational agent’s credence in the relevance of her temporal position to some proposition can change over time even though she receives no new information nor suffers from a cognitive mishap. This point is more evident in the original paper by Elga: https://swh.princeton.edu/~adame/papers/sleeping/sleeping.pd...
Does this not simulate the problem in python?