Moving to LA for a year or two. Buy new, used, or lease car?

I’m moving to LA for a year or two and don’t plan on staying past that. After LA, I’m not sure if I’ll need a car or not (I currently live in NYC where I don’t need one). I’m wondering what is the best idea financially for having a car out there. I’m looking for the most affordable option possible without driving something that will make me die on one of those LA freeways. Should I buy new, used, or lease?