Q: A run is a sequence of adjacent repeated values. Given a list, write a function to determine the length of the longest run. For example, for the sequence [1, 2, 5, 5, 3,
def longestrun(myList): size = 1 max_size = 0 for i in range(len(myList)-1): if myList[i+1] = myList[i]: size += 1 else: size = 1 if max_size
Remove the .split() from myList in main() and you're good to go with this.
.split()
myList
main()