The type of line is list, so you cannot apply any of the strip methods. The strip methods is for strings.
There you need to iterate over the list and apply rstrip() method on each string present in that list.
>>> line= ['ABDFDSFGSGA', '32\n']
>>> map(str.rstrip, line)
['ABDFDSFGSGA', '32']