Learned difficult lesson by it, apparently (10)
I believe the answer is:
ostensibly
'apparently' is the definition.
(I know that apparently can be written as ostensibly)
'learned difficult lesson by it' is the wordplay.
'lesson by it' can be anagrammed to 'OSTENSIBLY'.
However, I am not clear how the anagram is indicated.
Can you help me to learn more?
(Other definitions for ostensibly that I've seen before include "Evidently" , "on the face of it" , "Seemingly" , "to all intents and purposes" .)