Split And Map In Python For Input In Java