Single-walled carbon nanotubes (SWNTs) have been widely studied for their applications in transistors and logic circuits due to their excellent electronic properties. However, as-synthesized SWNTs are mixtures of semiconducting SWNTs and metallic SWNTs, hindering their practical deployment in semiconductor-based electronics. Sorting of SWNTs by conjugated polymers (e.g. polythiophene) is of particular interest because of its simplicity, high selectivity and high-yield. Here, we demonstrated the use of high-mobility n-type (electron-transporting) polymer for sorting of high-purity semiconducting SWNTs. The high selectivity of semiconducting SWNTs with n-type polymer is confirmed by Raman spectroscopy, dielectric force spectroscopy and transistor characterizations. In addition, our selected SWNTs have large-diameters than polythiophene-sorted SWNTs and hence are more desirable for electronic applications. Furthermore, by using high-mobility n-type polymer for sorting, we achieved ambipolar SWNT transistors with enhanced electron transport in comparison to polythiophene-sorted SWNTs, even on the flexible substrate. As a result, the ambipolar transistor characteristic allows the fabrication of negated AND (NAND) and negated OR (NOR) logic circuits from the same set of transistors, without the need for doping. The use of n-type polymer for sorting semiconducting SWNTs as well as using the resulting ambipolar SWNT transistors for CMOS-like logic circuits greatly simplify the fabrication of flexible SWNT logic circuits.