Single-walled carbon nanotubes (SWCNT) are purified, and diameters and lengths of the purified SWCNTs can be made selectable. The carbon nanotubes are purified by executing a step of adding the carbon nanotubes into a solution in which a template compound consisting of receptor regions each including a conjugated ring structure and a spacer region that fixes the receptor region is dissolved, and of extracting specific carbon nanotubes into the solution, and a step of recovering the extracted carbon nanotubes.