Subash Chandran posted: "def findShortest(lst): length = len(lst) short = len(lst[0]) ret = 0 for x in range(1, length): if len(lst[x]) < short: short = lst[x] ret = x return x # return the index of the shortest sentence in "
|

No comments:
Post a Comment
Note: Only a member of this blog may post a comment.