"But I want add script which will calculate intron length, which is "intron length = full length - exon length". Exon length = Transcription length."
Your code makes no mention of intron, exon or transcription. FASTA_format makes no mention of these eiter. I, like most people am not a bioinformatician. You're either going to have to describe your problem better (see links I previously gave which describe this in detail, direct link) or wait for someone who is familiar with terms you're using who is willing to help.