1. This website uses cookies to improve service and provide a tailored user experience. By using this site, you agree to this use. See our Cookie Policy.
    Dismiss Notice

[Python] Best Way To Handle Data?

Discussion in 'Programming' started by apex1, Nov 16, 2017.

  1. apex1

    apex1 Regular Member

    Joined:
    May 29, 2015
    Messages:
    214
    Likes Received:
    171
    Hey guys I'm working on a craigslist poster and I need to know the best way to handle data..
    • ad title
    • ad description (multi-line)
    • price
    etc

    I'm thinking about make 1 folder per ad, then having a text file for title, desc, price - does that make sense? From there how should I load them into Python?

    Do I use a dictionary or some kind of special list?

    Need advice.

    Cheers!
     
  2. lewo

    lewo Jr. VIP Jr. VIP

    Joined:
    Nov 16, 2017
    Messages:
    114
    Likes Received:
    66
    Gender:
    Male
    Occupation:
    Automation Expert
    Location:
    UK
    Hi,

    You could create a custom class with those 3 properties and then store them in a list
     
    • Thanks Thanks x 1
  3. apex1

    apex1 Regular Member

    Joined:
    May 29, 2015
    Messages:
    214
    Likes Received:
    171
    My man, much appreciated!