確かに！同じ結果を得るPython関数を紹介しよう：

``` 
import datetime

def count_weekend_days(start_date, end_date):
    # Convert start and end dates to datetime objects
    start = datetime.datetime.strptime(start_date, '%Y-%m-%d')
    end = datetime.datetime.strptime(end_date, '%Y-%m-%d')
    # Calculate the number of days between the two dates
    days = (end - start).days + 1
    # Calculate the number of weekend days between the two dates
    weekend_days = sum(1 for i in range(days) if (start + datetime.timedelta(i)).weekday() in [5, 6])
    # Return the total number of weekend days
    return weekend_days
```

この関数を使うには、開始日と終了日を 'YYYY-MM-DD' のフォーマットで指定して count_weekend_days を呼び出すだけです。この関数は、開始日と終了日を含む日付範囲内で発生した週末の日（土曜日または日曜日）の数を整数で返します。
Certainly! Here's a Python function that achieves the same result:

``` 
import datetime

def count_weekend_days(start_date, end_date):
    # Convert start and end dates to datetime objects
    start = datetime.datetime.strptime(start_date, '%Y-%m-%d')
    end = datetime.datetime.strptime(end_date, '%Y-%m-%d')
    # Calculate the number of days between the two dates
    days = (end - start).days + 1
    # Calculate the number of weekend days between the two dates
    weekend_days = sum(1 for i in range(days) if (start + datetime.timedelta(i)).weekday() in [5, 6])
    # Return the total number of weekend days
    return weekend_days
``` 

To use this function, simply call count_weekend_days with the start and end dates in the format 'YYYY-MM-DD'. The function returns an integer with the number of weekend days (Saturday or Sunday) that occur within the date range, inclusive of the start and end dates.