A process for separating semiconducting single-walled carbon nanotubes from a mixture of semiconducting and metallic single-walled carbon nanotubes, comprising the steps: (i) Providing a mixture A of semiconducting and metallic single-walled carbon nanotubes, (ii) Dispersing the mixture A containing semiconducting and metallic single-walled carbon nanotubes in a solvent using a degradable polymer comprising at least one unit of the formula wherein T 1 is a carbon atom or a nitrogen atom, T 2 is a carbon atom if T 1 is a nitrogen atom, or is a nitrogen atom if T 1 is a carbon atom, r is 1, 2, 3 or 4, s is 1, 2, 3, or 4, wherein M 1 is selected from the group consisting of and M 2 is selected from the group consisting of wherein R 1 is C 1-36 -alkyl, R 102, R 103 are independently selected from the group consisting of H and C 1-20 -alkyl, which can be prepared through a direct condensation of diamines containing r units M 1 and dialdehydes containing s units M 2 or of dialdehydes containing r unites M 1 and diamines containning s units M 2, as a dispersing agent to obtain a dispersion B of the semiconducting single-walled carbon nanotubes in a solvent, the dispersion further containing metallic single-walled carbon nanotubes, (iii) Separating the metallic single-walled carbon nanotubes from the dispersion B of the semiconducting single-walled carbon nanotubes in a solvent, to obtain an enriched dispersion C of the semiconducting single-walled carbon nanotubes in a solvent, (iv) Degrading by hydrolysis the polymer of the invention in dispersion C of the semiconducting single-walled carbon nanotubes in a solvent, (v) Separating the semiconducting single-walled carbon nanotubes from a solution D containing a solvent and the degraded polymer. (i) Providing a mixture A of semiconducting and metallic single-walled carbon nanotubes, (ii) Dispersing the mixture A containing semiconducting and metallic single-walled carbon nanotubes in a solvent using a degradable polymer comprising at least one unit of the formula wherein T 1 is a carbon atom or a nitrogen atom, T 2 is a carbon atom if T 1 is a nitrogen atom, or is a nitrogen atom if T 1 is a carbon atom, r is 1, 2, 3 or 4, s is 1, 2, 3, or 4, wherein M 1 is selected from the group consisting of and M 2 is selected from the group consisting of wherein R 1 is C 1-36 -alkyl, R 102, R 103 are independently selected from the group consisting of H and C 1-20 -alkyl, which can be prepared through a direct condensation of diamines containing r units M 1 and dialdehydes containing s units M 2 or of dialdehydes containing r unites M 1 and diamines containning s units M 2, as a dispersing agent to obtain a dispersion B of the semiconducting single-walled carbon nanotubes in a solvent, the dispersion further containing metallic single-walled carbon nanotubes, T 1 is a carbon atom or a nitrogen atom, T 2 is a carbon atom if T 1 is a nitrogen atom, or is a nitrogen atom if T 1 is a carbon atom, r is 1, 2, 3 or 4, s is 1, 2, 3, or 4, wherein M 1 is selected from the group consisting of and M 2 is selected from the group consisting of wherein R 1 is C 1-36 -alkyl, R 102, R 103 are independently selected from the group consisting of H and C 1-20 -alkyl, which can be prepared through a direct condensation of diamines containing r units M 1 and dialdehydes containing s units M 2 or of dialdehydes containing r unites M 1 and diamines containning s units M 2, as a dispersing agent to obtain a dispersion B of the semiconducting single-walled carbon nanotubes in a solvent, the dispersion further containing metallic single-walled carbon nanotubes, R 1 is C 1-36 -alkyl, R 102, R 103 are independently selected from the group consisting of H and C 1-20 -alkyl, which can be prepared through a direct condensation of diamines containing r units M 1 and dialdehydes containing s units M 2 or of dialdehydes containing r unites M 1 and diamines containning s units M 2, as a dispersing agent to obtain a dispersion B of the semiconducting single-walled carbon nanotubes in a solvent, the dispersion further containing metallic single-walled carbon nanotubes, (iii) Separating the metallic single-walled carbon nanotubes from the dispersion B of the semiconducting single-walled carbon nanotubes in a solvent, to obtain an enriched dispersion C of the semiconducting single-walled carbon nanotubes in a solvent, (iv) Degrading by hydrolysis the polymer of the invention in dispersion C of the semiconducting single-walled carbon nanotubes in a solvent, (v) Separating the semiconducting single-walled carbon nanotubes from a solution D containing a solvent and the degraded polymer.