Does the word "practice" have the same definition in the next two sentences?

I took over his practice when he retired.

It is not the local practice to wear shorts to dinner.
different meanings