(And those who invoke not any other god along with Allah....)" This was also recorded by An-Nasa'i, and by Al-Bukhari and Muslim. It was narrated that Sa`id bin Jubayr heard Ibn `Abbas saying that some of the people of Shirk killed a great deal and committed Zina a great deal, then they came to Muhammad ﷺ and said: "What you are saying and calling people to is good, if only you would tell us that there is a way to expiate for what we have done." Then the Ayah:
وَمَن تَابَ وَعَمِلَ صَالِحًا فَإِنَّهُ يَتُوبُ إِلَى اللَّـهِ مَتَابًا (And whoever repents and does righteous deeds he turns to Allah truly - 25:71). On the face of it, it looks repetition of the same subject as described in the preceding verse i.e. تَابَ وَآمَنَ وَعَمِلَ عَمَلًا صَالِحًا . But Qurtubi while quoting Qaffal has explained that this repentance is different and separate from the repentance described in the previous verse. It is because the previous verse related to deniers of monotheism and infidels who indulged in adultery and homicide and then submitted to Islam. Hence their sins were converted into virtues. But here the second verse speaks about the repentance of the Muslim sinners. This may be explained by the fact that in the previous verse the repentance was combined with the word آمَنَ which means that they accepted Islam whereas in the second verse the word آمَنَ is not there, which means that in the second verse the repentance is related to those sinners who had already converted to Islam or that they were Muslims, but by negligence indulged in adultery and homicide. Hence this verse relates to those Muslims who commit sins, but then repent on their folly sincerely and seek Allah's forgiveness and then keep themselves away from sins and evil deeds. Such repentance by the Muslims will be regarded in order and accepted. It should be understood here that the word تَوبَہ (taubah) is used here in conditional clause as well as in principal clause. In the conditional clause it means verbal repentance, and in the principal clause it refers to the practical repentance in the sense of correcting one's deeds. Hence it means that if someone repented on his sins and proved his sincerity by not indulging in those sins again would be regarded as on the right path towards Allah Ta’ ala. As against this the one who repented on his past sins but continued indulging in those sins, is like the one who has not repented.
In brief if a Muslim indulged in a sin by negligence and then realized that he has done wrong and repented and after that kept himself away from the sin, his repentance will be accepted by Allah Ta’ ala, and hopefully he will get the same benefit as described in the first verse i.e. his sins will be converted into virtues.
Some rules of taubah (repentance) from sins had been mentioned during the traits of Allah's favoured servants. The next verses are back to the original subject.
Tazkirul Quran
Maulana Wahiduddin Khan
Real virtue in the eyes of God is a man’s becoming God-fearing. Any virtue which makes a man fearless of God is, in fact, a sin, while that sin which makes a man God-fearing is in fact, in terms of its result, a virtue. If a man happens to commit a sin but later on, seeing the error of his ways rushes towards Him in repentance (tawbah) and seeks His pardon, then God will mercifully add this sin to the list of his virtues, because that had made him turn towards Him.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.