I have a file with “mark,19,2050.50,Chris,20,2010.40”
as its content.
If I read the file using open()
, the contents are assigned into the file as textIOwrapper
. If I split and store it in a list using the delimiter(‘,’ in this case) the list contains the values as strings.
For eg : [‘mark’,’19’,’2050.50’, ‘Chris’,’20’,’2010.40’]
I need the output to be
[‘mark’, 19, 2050.50, ‘Chris’,20,2010.40]
Any idea how to do this? Thanks