A polymer comprises a polymeric chain represented by formula (I) or (II). In formula (I), a, b, c, d, and n are integers, a from 0 to 3, b from 1 to 5, c from 1 to 3, d from 1 to 5, and n from 2 to 5000; R1 and R2 are side chains; R3 and R4 are each independently H or a side chain; and when a is 0, R3 and R4 are side chains. In formula (II), a, b, c, d, e, and n are integers, a from 1 to 3, b and c being independently 0 or 1, d and e being independently 1 or 2, and n from 2 to 5000; R1 and R2 are side chains except —COOalkyl; and X1, X2 and X3 are independently O, S, or Se. Semiconductors and devices comprising the polymer are also provided.