I was wondering if anyone could help me refactor the following Python code:
In this example, endDate is a string like such: "2012-08-22"
dateArray = [int(x) for x in endDate.split('-')]
event.add('dtend', datetime(dateArray[0], dateArray[1], dateArray[2]))
I appreciate it!