Random number guessing game in python
Commenting

Almost universally, comments go before the code they're commenting, rather than after. Conforming to what people expect will make it much easier to read.

Comments should describe why, not what. 

# the game continues
while play == 'yes':

# sets a max of 20 guesses
while guessesTaken &lt; 20:
        print ('Take a guess!')

# adds to the guess counter
guessesTaken += 1 


That's all examples of where you're describing something that's kind of obvious from looking at the code. This makes it harder to read, because they's more going on. Here's an example of a better comment:

try:
    # If the user enters a number out of range, still counts as a guess
    guess = int(input())
except:
    print ("I'm sorry...")
    continue


Code to show intentions

I'm guessing you haven't learned about functions, so I won't say too much here. They're a good tool that would help a lot to make things more clear. Instead, let's talk about your main loop.

while play != 'yes' and play != 'no':
    print ("I'm sorry, I didn't understand that. Please type yes or no.")
    play = input ()


This looks like a section to do input validation. This is why @Graipher asked if the indentation afterward was correct. To make it more clear, break up the continuation from the validation:

while play != "no":

    #Invalid input
    if play != "yes":
        print ("I'm sorry, I didn't understand that. Please type yes or no.")
        play = input ()
        continue


It's also common to do something like while True, then explicitly break out whenever you're done.

Now, guessesTaken is in a lot of places it doesn't really need to be, which makes it hard to keep track of. Instead of setting it at the beginning, just set it at the beginning of the loop.

while play == 'yes':
    number = random.randint (1,100)
    guessesTaken = 0


This way, your initialization happens in one place, when you use the variable you don't have to go back as far to see what it is, and you don't have to reset it at the end.

Everything is kind of running together. You can use blank lines (and functions!) to break it into logical sections. In the play loop, you can put a blank line in between when you get the guess, and when you check it. Indenting your comments to align with the rest of the code will also make it easier to see the blocks.

Finally, while play == 'yes': This should really be if instead of while. Right now, you have three different loops, which makes it hard to keep track of where the breaks and continues are sending you.