Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C#

Henrik Christensen
seal-mask
.a{fill-rule:evenodd;}techdegree
Henrik Christensen
Python Web Development Techdegree Student 38,322 Points

Internally data vs data in files

Hi,

I'm currently working on a project where I am storing all the data in a list, internally in the program, and the list will end up containing like 116 objects with 10-15 properties each.

Now I'm wondering if it would be better to store the data in a .csv or .json file (instead of storing that data internally) and then load the objects from the file on program start?

1 Answer

saif ahmad
saif ahmad
9,302 Points

A JSON file is a good and efficient way to store your data it is quite simple and well structured. I suggest you use it.

Henrik Christensen
seal-mask
.a{fill-rule:evenodd;}techdegree
Henrik Christensen
Python Web Development Techdegree Student 38,322 Points

Yeah I know it a good way to store data, but my question was (might have been formulated poorly) if it is better to move the list with 116 objects into a file, or if it's fine to leave it in the code? :-)