Jump to content

What would be the best way to make this program

- - - - -

  • Please log in to reply
1 reply to this topic

#1
rpb1323

rpb1323

    Newbie

  • Members
  • Pip
  • 4 posts
Currently, I have a function that takes a flight plan report, and turns it into a list, such that each line of the report is an item in the list. Now, each report contains flight "legs". In most reports there are 20 or so legs. What I need to do is create a function that sorts each "leg" into its own list. Each leg begins with a header that says the leg number (for example, "Leg 1", "Leg 14", etc.), and each leg has 10 or 20 lines of data associated with it. I need to sort each leg into its own list, using the list containing the entire report.

The difficult part, I've found, is making the program create lists ONLY for the number of legs in the report. How would I automate this?

Thanks.

#2
yamman13

yamman13

    Learning Programmer

  • Members
  • PipPipPip
  • 56 posts
hmm, if you clarified a bit I could probably help. So you have a string or something that is turned into a long list of strings, and for each string, you want to turn them into lists themselves, based on a new list starting with Leg 1..etc ?




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users