
Patrick B. answered 04/03/21
Math and computer tutor/teacher
# You get ONE LESS than the ending index
inputDateStr = "1985-08-01"
strSliceMonth = inputDateStr[5:7]
strSliceYear = inputDateStr[0:4]
outbuffDate = strSliceMonth + "-" + strSliceYear
print(outbuffDate)