Trim the ends of the beans and chop them finely. If using frozen pre-cut beans, wash the beans once and drain water completely.
Grind the coconut and green chillies coarsely. Soak tamarind in 3 tbsp warm water and extract the juice. If using tamarind paste, dilute in 3 tbsp warm water.
In a pan heat oil and add mustard seeds. When in splutters add red chillies, asafoetida, urad dal, curry leaves and fry till dal turn golden.
Add beans, turmeric powder and fry for 2-3 minutes. Add the tamarind extract, salt and mix well. Cover and cook until the beans has cooked, stirring in between.
If any water is left, cook uncovered till the water has evaporated. Now add the coconut-green chilly mixture and fry for another 3-4 minutes.