0

Is it possible to split the data in a list that looks similar to this:

random_data = 
    [my_data]
    Colour = "yellow"
    Day = "monday"
    Weight = "500kg"
    month = "May"

Where the contents of the colour, day etc. can change?

0

1 Answer 1

1

I think you should use python dictionary.

random_data = {"Colour": "yellow", "Day": "monday", "Weight": "500kg", "month": "May"}

you can change data by following

random_data["Colour"] = "red"
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks but I'm not able to convert the data into a list format, there can be several hundred items.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.