Question: I am just getting started with REST API and I have a few question. I am not sure exactly when it's best to use query parameters or path parameters or to send data in the body?

Right now I am designing a social media platform, and for example I don't know if when a user adds a comment, how should he use it? Is adding it in the request body the best option?

Please, also explain in general, not only for this example. Thank you!

Answer: 
This job belongs to the `csv` module:

```py
import csv

out = next(csv.reader([s], skipinitialspace=True))
# out is
# ['name', '12345', 'Hello', '12,34,56', 'World']

```

**Notes**

* The `csv` library deals with comma-separated values, perfect for this job
* It understands quotes, which your input calls for
* The `csv.reader` takes in a sequence of texts (i.e. lines of text)
* The `skipinitialspace` flag is just that: it tells the reader to skip initial spaces before each value
You can try built-in `csv` module to parse the string:

```py
import csv
from io import StringIO

s = 'name, 12345, Hello, "12,34,56", World'

print(next(csv.reader(StringIO(s), skipinitialspace=True)))

```

Prints:

```
['name', '12345', 'Hello', '12,34,56', 'World']

```