How do astronomers know whether they are seeing planets or stars when they are distant?

1 answer

"Twinkle, twinkle little star," but that is unlikely with planets. Also planets rotate in contrast to stars.