# How to print list slot with type of list in bot utterance?

**URL:** <https://forum.rasa.com/t/how-to-print-list-slot-with-type-of-list-in-bot-utterance/21205>\
**Category:** Rasa Open Source\
**Created:** [November 13, 2019, 12:56pm UTC](https://forum.rasa.com/t/how-to-print-list-slot-with-type-of-list-in-bot-utterance/21205 "2019-11-13T12:56:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kabeer](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/kabeer/32/5310_2.png) [@kabeer](https://forum.rasa.com/u/kabeer)\
**Post date:** [November 13, 2019, 12:56pm UTC](https://forum.rasa.com/t/how-to-print-list-slot-with-type-of-list-in-bot-utterance/21205/1 "2019-11-13T12:56:09Z")

</div>

I am trying to print a slot type of list in bot utterance, it is printing successfully. But I need to format it.

**Slot**

```
  slots:
   hospital_list:
     type: list

  utter_list_of_hospital:
   - text: Here are the available hospitals {hospital_list}

```

In the shell it prints,

```
   Here are the available hospitals ['Oasis Hospital', 'Mediclinic Al Jowhara']

```

I am setting the slot ` hospital_list` using a custom action.

**actions.py**

```
   def run(self,dispatcher,tracker,domain):
         data_lst = ['Oasis Hospital', 'Mediclinic Al Jowhara']
         return [SlotSet("hospital_list",data_lst)]

```

I need to print like

```
  Here are the available hospitals:
     * Oasis Hospital
     * Mediclinic Al Jowhara

```

How can i do this?

---

<div class="post-metadata">

**Author:** ![k1m](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/k1m/32/8518_2.png) [@k1m](https://forum.rasa.com/u/k1m)\
**Post date:** [November 13, 2019, 3:52pm UTC](https://forum.rasa.com/t/how-to-print-list-slot-with-type-of-list-in-bot-utterance/21205/2 "2019-11-13T15:52:59Z")

</div>

You can juse [Python String join() Method!](https://www.w3schools.com/python/ref_string_join.asp)

**actions.py**

```
def run(self,dispatcher,tracker,domain):
         data_lst = ['Oasis Hospital', 'Mediclinic Al Jowhara']
         return [SlotSet("hospital_list",(', '.join(data_lst)))]
```
