title: Python - Split genetic data with uppercase and lowercase elements of a string with no spaces into list
body: <p>I'm dealing with filtering large chunks of genetic data. For ease of reference, we'll use a string of shorter elements as such:</p>
  
  <pre><code>geneData = 'gggtacaccaaGGCCTATAACAttacatCTACATTGGAtcaggatccaaaATTAAGGAA'
  </code></pre>
  
  <p>I want to split this string into a list of all the uppercase sections as words (and eventually with the lowercase portions), so this is my needed output:</p>
  
  <pre><code>cleanedExons = ['GGCCTATAACA', 'CTACATTGGA', 'ATTAAGGAA']
  </code></pre>
  
  <p>This is similar to how I have split up words in the past from a sentence and I've been trying to adapt the code to split the string into a list with little success. Here is my current code:</p>
  
  <pre><code>def Exon_Split(string):
      IntronLetters = 'gcat'
      L=string.split(IntronLetters)
      cleanedExons=[]
      ExonLetters = 'GCAT'
  
      for e in L:
          word = ''
          for c in e:
              if c in ExonLetters:
                  word += c
          if word!=ExonLetters:
              cleanedExons.append(word)
      print(cleanedExons)
  Exon_Split(geneData)
  </code></pre>
  
  <p>This is the output I get. As you can see, it does not get split into the desired elements:</p>
  
  <pre><code>['GGCCTATAACACTACATTGGAATTAAGGAA']
  </code></pre>
  
  <p>Is there a way to make python see these chunks of uppercase as "words"?</p>