Having problems solving issue with parsing pyhton list