I am very new to Python, and hope you can help me.
I have a list of strings called reviewerdetails
that contains information on reviewers on Hostelworld. In each string, there are three elements: the country, the gender and the agegroup of the reviewer. For example, the first case looks like this:
'\n Belgium, Female, 18-24 '
I want to create three separate lists for these three elements, but I am not sure how to select elements within a string within a list? I have tried the .split
function, but I get the error
AttributeError: 'list' object has no attribute 'split'.
I found this question: split elements of a list in python that sort of tries to do want I want to do, but I do not know how to apply the answer to my problem.