In his new memoir, Arizona senator and former Republican presidential nominee John McCain explains the process for how to get a bill passed in Congress -- and it all comes down to persistence.

In the book co-authored with Mark Salter titled "The Restless Wave: Good Times, Just Causes, Great Fights, and Other Appreciations", Mr McCain detailed the process for how he was able to get campaign finance reform passed in Congress and signed into law.

The Bipartisan Campaign Reform Act, more commonly known as the McCain-Feingold Act, passed in March 2002.

But according to Mr McCain, passing campaign finance reform and other pieces of legislation in Congress requires persistence.

"Don't give up, be persistent," Mr McCain said. "If you can't get it done in this Congress, try again in the next."

Mr McCain continued by saying that politicians must be aware of changes in the political environment in order to know when to strike when the iron is hot. He also advocated for the importance of compromise when looking to pass legislation.

"Make necessary compromises to build a bipartisan coalition in favour of [the bill]," Mr McCain said. "Use your friendships to recruit as many influential members to your side as you can."

He also recommended listening to allies on both sides of the aisle, as it will be these people who will alert you to potential roadblocks to proposed legislation and tell you who does and does not want to work with you. Mr McCain also said that it is important to delegate responsibilities to supporters in helping get the bill passed.

Lastly, Mr McCain says media attention is crucial to getting legislation passed and pressuring lawmakers to support the bill.

"Box in the cynics with public and media attention, make sure the more transactional politicians know there's a cost to opposing the bill," Mr McCain wrote.

"A lot of momentum for an issue is illusory and based on excessive faith in the media's sustained attention to it and potency of its public support. Get it done before your opponents figure that's not the case. And get a little lucky."

Read more: