Postgresql Split String Function Python Practice