The pontiff, 84, was admitted to Rome’s Gemelli hospital on July 4, with a severe narrowing of his large intestine. .
Matteo Bruni, the Vatican spokesman, said the pontiff wanted to “express his gratitude for the success of his surgery and offer a prayer for all the sick, especially those he had met during his stay in hospital”.
The Pope was treated on the 10th floor of the hospital which has a suite reserved for popes.
The octogenarian had been suffering from symptomatic diverticular stenosis, or restriction, of the colon.
The condition typically develops in older people and is caused by small pockets developing in the lining of the intestine.
Most people do not show symptoms unless it becomes infected in which case it can become painful and cause tummy upsets.
Following the three-hour procedure on Sunday, the Vatican said Pope Francis was in “good condition, alert and breathing on his own.”
It is the first time the pontiff has been hospitalised since he ascended to the papacy in 2013.
He was initially set to be discharged at the weekend, but doctors advised him to stay a few more days for further recovery and rehabilitation.
Before returning to the Vatican, the Pope stopped to pray at Santa Maria Maggiore basilica in Rome.
He also took a moment to greet the security guards at the Perugino Gate which marks the entrance to the Vatican and is named after an Italian renaissance painter and teacher of Raphael.
The Pope’s medical procedure was scheduled for this time of year as he usually takes some time off and his audiences are suspended.
Making his first public appearance since Sunday’s surgery, the pontiff stood on the balcony of his suite and spoke for around 10 minutes.
On Tuesday, he visited a children’s cancer ward and was seen walking without assistance.
The Pope has no scheduled events for the rest of July with the exception of his Sunday blessing.
In September, the Pope is expected to visit Slovakia and Hungary and in November, is planning to attend the COP26 climate conference in Glasgow.