Question: Is it possible to perform a for loop in a template in bazel using the actions.expand\_template() call?

I'd like to be able to pass in a list of strings and iterate over them to generate code. From all I can tell in the examples, you can only provide a flat dict object and perform single substitution.

My template ideally would have something like:

```
{% for k in keys %}
    {{ k }}
{% endfor %}

```

Answer: 
Replace everything `".*"` up to and including the last slash and space `"/ "` with the empty string:

```
gsub(".*/ ", "", DF$place)
## [1] "Village3"  "District2" "Farm1" 

```

Note
----

The input in reproducible form is:

```
Lines <- "
                                  place
        District1 / Commune2 / Village3
                    Region1 / District2
District3 / Commune1 / Village1 / Farm1"
DF <- read.table(text = Lines, header = TRUE, as.is = TRUE, sep = ";")

```
This also works:

```
trimws(basename(df$place))

```