People say you shouldn't compare apples and oranges but it seems to work fine for me in Python 3.14, I don't see what the issue is...
@emmatyping
Well, it's not a statically-typed language. In Rust you'd have to define some kind of Fruit trait.
Rust Playground

A browser interface to the Rust compiler to experiment with the language

@emmatyping
Thanks for fact-checking my joke, I nearly encouraged people to learn how Rust traits work on a Saturday night, but you saved them.