Hi Terry. Mr. Feeney has the solid answer here. I'll elaborate a bit. Yoru contract of sale should specify that the apartment be vacant and broom swept prior to the closing and preferably before your 24hr walk-through. If the tenant is a holdover, you become an instant landlord and that could be a problem for more than a few reasons.
One problem with a holdover is you now have to make sure you get the info as to what Bank is holding their security deposit. You'll have to return it as you are now the owner. You may also run afoul of the Coop board as they will have proceedures for a sharholder to rent the apartment. They most likely require at least a one year (could be more) tenancy before you can rent. There is much more as well.
In short, don't get caught here and be driven nuts because you bought a place with a tenant in it. Good luck.