Algorithm that parses through input of points and finds distance
Choose a better name than calc(). Something like distance() or euclidean_distance().
There is no need for the variable temp, just write
for i in line.split(",")
The for i in temp loop can be written more simply as:

li.extend(i.split() for i in temp)

Remove all commented out code that you don't immediately need.
The for index in range(len(li)-1): doesn't need to be in the with statement, as it is not using filestream.
res can be calculated as part of the for i in temp: loop and avoid li altogether.