Experience is the hardest kind of teacher. It gives you the test first and the lesson afterward.
Attribution uncertain
This attribution could not be reliably confirmed.
I found no primary source showing Oscar Wilde used this wording; modern attributions trace the phrasing to mid-20th-century uses (often credited to Vernon Law), so the Wilde attribution is not supported by reliable primary evidence.
Barry Popik (blog)