When I run the following code (from chapter 19 of Introduction to Computation and Programming Using Python by John Guttag):
dataFile = open(fName, 'r')
for line in dataFile:
dataLine = string.split(line[:-1], ',')
I receive the following error:
error message:module 'string' has no attribute 'split'
string.splitfunction has been deprecated in favour of thestrtype's.splitmethod for ages.