# Error while converting string to list

**URL:** https://forum.robotframework.org/t/error-while-converting-string-to-list/4993
**Category:** Robot Framework
**Created:** [28 November 2022 10:01 UTC](https://forum.robotframework.org/t/error-while-converting-string-to-list/4993 "2022-11-28T10:01:53Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![swapnil1518](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/swapnil1518/32/2081_2.png) [@swapnil1518](https://forum.robotframework.org/u/swapnil1518)
#### Post date: [28 November 2022 10:01 UTC](https://forum.robotframework.org/t/error-while-converting-string-to-list/4993/1 "2022-11-28T10:01:53Z")

</div>

Hi I am getting this error  
TypeError: Expected argument 1 to be a list or list-like, got string instead

How to convert given output into list in robotframework?

---

<div class="post-metadata">

### Author: ![\_daryl](https://avatars.discourse-cdn.com/v4/letter/_/45deac/32.png) [@\_daryl](https://forum.robotframework.org/u/_daryl)
#### Post date: [28 November 2022 12:04 UTC](https://forum.robotframework.org/t/error-while-converting-string-to-list/4993/2 "2022-11-28T12:04:17Z")

</div>

> [@swapnil1518](#):
>
> TypeError: Expected argument 1 to be a list or list-like, got string instead

Without guessing, it is worth sharing where the type error occurs since that seems to be where the problem lies, Thanks.

---

<div class="post-metadata">

### Author: ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)
#### Post date: [28 November 2022 15:37 UTC](https://forum.robotframework.org/t/error-while-converting-string-to-list/4993/3 "2022-11-28T15:37:41Z")

</div>

What you can do is to create a small example of what is your problem.  
You have some output in the form of a string and want to convert to list.  
What would be the separator for those elements?

This is an example of using python functions, if the separator is ‘:’ (I did not test this):

```python
@{my_list}= Create List ${output.split(':')}

```

---

<div class="post-metadata">

### Author: ![swapnil1518](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/swapnil1518/32/2081_2.png) [@swapnil1518](https://forum.robotframework.org/u/swapnil1518)
#### Post date: [1 December 2022 05:08 UTC](https://forum.robotframework.org/t/error-while-converting-string-to-list/4993/4 "2022-12-01T05:08:47Z")

</div>

This is resolved Thank You!
