John Avlon is a CNN senior political analyst. The opinions expressed in this commentary are his own. View more opinion on CNN.

(CNN) You'd be forgiven for thinking that there are no rules in politics and there's nothing more to learn from history.

After all, a guy who got caught on tape bragging about sexually assaulting women got elected president by winning a majority of white women over the first female presidential nominee.

Donald Trump was a populist outsider who violated all the rules of politics. He did not care about the Republican Party and he didn't try to build a broad coalition. But he was beloved by his base, even as the GOP establishment warned he would be a disastrous nominee.

Now, many people are seeing a replay of that same script with the rise of Bernie Sanders. There's no question that this outsider has built a populist movement and moved the debate inside the Democratic Party decidedly to the left . His supporters are passionate and quick to condemn the Democratic establishment.

And after two caucuses and one primary, Bernie Sanders is the Democratic front-runner after trailing Joe Biden in the polls for most of the campaign . Now, he has momentum.

But can Bernie win? That's the 270-electoral vote question.

Because the No. 1 issue for Democrats this election is simple: Beating Trump.

And interestingly, according to a January CNN poll , 45% of Democrats thought Biden had a better chance of beating Trump in November, while Sanders trailed in second at 24%.

Typically, the most ideologically extreme candidate is the one worst positioned to win over swing voters in swing states. Barry Goldwater and George McGovern are iconic -- if dated -- examples. Both lost in landslides.

But what if this time it's different?

As Pete Hamby wrote in Vanity Fair, "Instead of asking if Sanders is unelectable, ask another question: What if Sanders is actually the MOST electable Democrat?"

Now this might sound like magical thinking, but Hamby explains: "In the age of Trump, hyper-partisanship, institutional distrust, and social media, Sanders could be examined as a candidate almost custom-built to go head-to-head with Trump this year."

Bernie is a political celebrity: People know what he stands for, for better or worse. He is authentic and admirably consistent about his self-described democratic socialist views

But there's plenty to suggest that those views play better in a polarized Democratic primary than in a general election.

Let's take a look at the ideological divisions inside the Democratic Party.

On the surface, the party is basically split evenly between liberals and moderates. But dig a little deeper and you'll see, according to Pew , only 15% of Democrats identify as very liberal, where a democratic socialist agenda would logically fall. Beyond that, 32% describe themselves as liberal, 38% as moderate and 14% as some flavor of conservative. It is not a far-left party, despite the youthful energy inspired by Sanders' promises of free health care and free college. A fractured center lane makes it tough to match Sanders so far in first-past-the-post totals.

Panning out to the overall American electorate, just 27% of Americans identify as Democrats, according to the most recent Gallup tracking poll , with 30% describing themselves as Republicans and 42% declaring as independents. Likewise, Gallup makes it clear that America remains a center-right nation , with 37% of Americans calling themselves conservative, 35% moderate and just 24% liberal.

The takeaway: Any nominee is going to need to win votes beyond their base to win the presidency -- and a far left candidate will presumably have more work to do.

Now, Bernie's electoral argument is the same as Trump's -- he'll drive turnout by connecting with working-class voters who've been alienated by the establishment. That may be the case. But it's notable that the new voters who Sanders' claims will turn out for him have not done so in the three caucuses and primaries to date.

Then there's the label "socialism" -- the umbrella under which democratic socialism lives. It's really not popular: Gallup shows that more Americans say they would vote for a gay, Muslim or atheist president than a socialist. There's a reason why Team Trump rails against socialism and wants to run against Sanders.

You can argue that Americans vote on authenticity, not ideology. And that's a fair point in the Trump era.

But the center-right center of gravity is tougher to argue. Democrats need to understand why Reagan and Nixon won 49 states in landslide reelections , while Clinton and Obama had to fight for their second terms, despite strong records amid economic recoveries.

The electoral college also seems to favor the GOP, with Trump and George W. Bush winning the White House despite losing the popular vote . That means running up margins in New York and California isn't enough. Democrats can't afford to write off Florida or ignore the warnings of swing-district congressmen about the down-ticket impact of Sanders.

Get our free weekly newsletter Sign up for CNN Opinion's new newsletter. Join us on Twitter and Facebook

Bottom line: Could Bernie win? Sure -- anything is possible. But possible is not the same thing as probable. Donald Trump is a historically unpopular President despite a strong economy to date. But, a lot can and will happen before November.

According to a recent Washington Post/ABC poll , the top-tier Democrats beat Trump by different margins in head-to-head matchups.

The same thing is largely true for swing states such as Pennsylvania and Michigan, which is a far better gauge of who might win the presidency.

Bernie Sanders has built a movement and he has momentum. But there are plenty of rational reasons to think that nominating a democratic socialist in a center-right country is a real risk -- and could deliver Donald Trump a second term.