Abu Musa al-Ash'ari (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings be upon him) said: "Allah Almighty extends His hand at night so that the one who erred during the day may repent, and He extends His hand during the day so that the one who erred during the night may repent, until the sun rises from the west."
And the repentance of Pharaoh's sorcerers, which is mentioned in detail in the Qur'an, is sufficient proof that the repentance of a sorcerer is accepted.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب القسامة / 16504