title: dynamic programming question similar to traveling salesman in python
body: <p>So I just started exploring dynamic programming a little bit more in depth and I have come across a question which I've been unable to solve for a while now. I would greatly appreciate any help with it.</p>
  <p>Find the maximum revenue for a salesman who knows how much revenue he will get in each city per day, given he is free for <code>len(days_travel)</code> days;</p>
  <p>The input list revenue shows the revenue he will get on a particular day at a particular city (eg. <code>revenue[0][1] = 2: day 0 and at city 'b'</code>) and travel days is the number of days he requires to travel from one city to the other (eg. <code>days_travel[2][1] = 2 days is required to move from city c to city b</code> and <code>start</code> is the city he starts in (at day 0)</p>
  <p><a href="https://i.stack.imgur.com/HWax7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HWax7.png" alt="enter image description here" /></a></p>