A 401K is exempt, and in fact although you are required to place the account on the schedules, you indicate "not in bankruptcy estate".
Whether or not bankruptcy filers can keep any individual piece of property depends on many factors, including how much property is owned and what exemptions are available to cover the property.
Volumes are available on the subject, so here's a summary in response to your general question. In 2005 Congress amended the bankruptcy laws, imposing a "means test". If your household's average monthly income over the last 6 calendar months is less than the census bureau's statistics for current monthly income in your state, then you qualify for a chapter 7 discharge. If not, then you would likely qualify for a chapter 13, which requires that you pay a certain percentage of your debts in a "plan" over the next to five years.
Even though bankruptcy law is federal, the next question is whether all of your assets, including any equity value in your real estate, car(s) or other property is protected by exemptions available under your state law.
Finally, bankruptcy requires review of your entire financial situation including all debts, income and assets. I highly recommend that you seek representation from an attorney in your jurisdiction who is experienced in bankruptcy law.