9 lines
217 B
Python
9 lines
217 B
Python
def splitLine(line, split_char=',', return_type=None):
|
|
if split_char:
|
|
line = line.split(split_char)
|
|
|
|
if return_type is None:
|
|
return line
|
|
else:
|
|
return [return_type(i) for i in line]
|