title: Python If printed results are the same as before print no change otherwise print new results. Run again every 10 mins
body: <p>I want to run this script every 10 minutes and if the results are the same today I don't want to print them again unless they change. Is this even possible? No I'm not a programmer by any means this is just a hobby.</p>
  <p>I'm using Twilio to send me a sms message for campsites that are available but I don't want to receive the same sms message every 10 minutes. I removed the Twilio code because it has my account info. Thank you in advance for any help. Here is my code below.</p>
  <pre><code>from datetime import datetime
  import pandas as pd
  import requests
  from tabulate import tabulate
  
  
  result = []
  for unit_id in range(5095, 5099):
      resp = requests.get(
          f&quot;https://calirdr.usedirect.com/rdr/rdr/fd/&quot;
          f&quot;availability/getbyunit/{unit_id}/startdate/2020-10-30/nights/30/true?&quot;).json()
      result.extend(resp)
  
  filter_by = ['UnitId', 'StartTime', 'IsFree', 'IsWalkin']
  df = pd.DataFrame(result)
  df = df.filter(items=filter_by)
  df['StartTime'] = df['StartTime'].apply(lambda d: datetime.fromisoformat(d).strftime(&quot;%Y-%m-%d&quot;))
  df = df[df['IsFree']]
  df = df[~df['IsWalkin']]
  df['UnitId'] = df['UnitId'].replace([5095], 'Site 81')
  df['UnitId'] = df['UnitId'].replace([5096], 'Site 82')
  df['UnitId'] = df['UnitId'].replace([5097], 'Site 83')
  df['UnitId'] = df['UnitId'].replace([5098], 'Site 84')
  df['UnitId'] = df['UnitId'].replace([5099], 'Site 85')
  print(tabulate(df, headers=filter_by))
  </code></pre>
  <p>Below are the results if you run the code.</p>
  <pre><code>    UnitId    StartTime    IsFree    IsWalkin
  --  --------  -----------  --------  ----------
  62  Site 83   2020-11-01   True      False
  80  Site 83   2020-11-19   True      False
  89  Site 83   2020-11-28   True      False
  
  Process finished with exit code 0
  </code></pre>