If there is a handrail, hold onto it and use your cane in the other hand. Use the same method for a set of stairs that you do for single steps.
Go up the stairs with your stronger leg first, then your weaker leg, and then the cane.
If you are going down the stairs, start with your cane, then your weaker leg, and then your strong leg.
Take the steps one at a time.
When you reach the top, stop for a moment to regain your balance and strength before moving on.
If you had surgery on both legs, lead with your stronger leg when going up and your weaker leg when going down.