Solid-stated smart polymers responsive to external stimuli have attracted much attention for potential application in the field of photoelectron devices,logic gates,sensor,data storage and security.However,it is a bigger challenge for polymers than that for small molecules in solid state to acquire stimuli-responsive properties,because polymers with high molecular weight are not as easy to change the packing structure as small molecules under external stimulation.Here,a D-A type alternating copolymer PTMF-o containing 3,4-bisthienylmaleimide(A unit)and fluorene(D unit)is designed and synthesized.Upon irradiation of sunlight,PTMF-o film exhibits a photo-response with the color altering from purple to colorless.It is attributed to the structure of copolymer transformed from ring-opening form(PTMF-o)to ring-closure form(PTMF-c),resulting from the oxidative photocyclization of 3,4-bisthienylmaleimide unit.Consequently,the ability of charge transfer(CT)from fluorene to 3,4-bisthienylmaleimide unit in PTMF-o can be easily weakened by light stimuli.PTMF-o film displays a WORM-type resistive storage performance for the strong CT.Interestingly,after exposure,the electrical memory behavior in situ transfers into FLASH type,due to weak CT in PTMF-c.PTMF-o film can also be employed as smart material to construct NAND and NOR logic gates by using light as input condition.The work provides a simple way to modify the electronic properties of polymers and realize stimuli-response in solid states.