Can you lose weight from a rice + black beans diet?

I vaguely remember seeing another redditor’s comment about a diet they followed where they strictly only ate rice and black beans for a while. The person said they consistently ate 3 meals a day and that they lost a ton of weight.

I forgot which kind of rice they were talking about but my guess is brown rice?

I don’t know too much about nutritional values so I just go by calories because it is easier, but I haven’t eaten anything tasty in such a long while. Just cucumbers, a ton of water, protein shakes, boiled eggs and sometimes yoghurt. It gets incredibly boring and rice with black beans sounds like a 5 star course to me right now.

I don’t know/remember what/if the person said about exercise so let’s assume that it is just moderate activity. Does such a diet help with weight loss? assuming you stay faithful to the diet and perform moderate exercise , what could you lose per week with such a diet? How big should your portions be if you want to survive and lose weight, assuming the diet works?

Can you lose weight from a rice + black beans diet?