ASP sorting type question

Discussion in 'OT Technology' started by johnnywallywallace, Sep 3, 2003.

  1. anyone want to help me figure out how to sort this?

    I'm building a movie showtimes report in ASP that produces Quark-formatted output files. each record looks something like the following:

    The Blair Witch Project
    (R) 87 min. 9
    Documentary-style thriller about three student filmmakers who ... (rest of synopsis)
    Brockport Strand
    Sat.: 3:15, 5:35, 7:30, 9:15
    Sun.: 3:15, 5:35, 7:30, 9:15

    my new report needs to combine sequential days with matching showtimes; in other words:

    Sat.-Sun.: 3:15, 5:35, 7:30, 9:15

    But I'm really not certain how to go about sorting or checking for this. I suppose I could build an 7-index array of the showtimes for the week, iterate through the array, and build another array, this one 6-indices of match bits, indicating which days in a row match ...
  2. Jericho

    Jericho Active Member

    Oct 21, 2002
    Likes Received:
    :dunno: I don't know if this is what you're looking for..

    a = ['3:15', '5:35', '7:30', '9:15']
    b = ['1:15', '3:15', '5:35', '7:30', '9:15']
    for x in a:
       for y in b:
          if x == y:
             print x
    this outputs

    Last edited: Sep 3, 2003
  3. not exactly what I was looking for, but thanks. I got it worked out, multiple arrays and a couple of dictionary objects and I think I'm good. I'll post my final code later.

Share This Page