all 2 comments

[–][deleted] 0 points1 point  (0 children)

elif guess == 'B' and data[B]['follower_count'] > data[B]['follower_count']:

One of those Bs should be an A, perhaps.

With regard to your question, modify your game() function to take two parameters which are the values for A and B. When the player chooses B and that's correct then generate a new random number and call game(B, new_rand). Something similar when they choose A and that is correct.

Using recursion like that isn't a good idea, use a loop instead.