Three Cards Trick - Assigning random number to the cards
Style

The name CreateCard is pretty bad. One would expect it to create a card and return it.

Making things easier to change

At the moment, if you ever want to use 4 or 5 cards instead of 3, you have to update code in multiple places : Q = random.randint(1,HERE), cards = HERE (3 times) and add tests like elif Q == VALUE:. This is just too easy to get wrong.

Even assuming you can only use randint, you have various ways to achieve what you are doing in a less repetitive way.
First idea would be to tell that once you've generated the position for Q with q_pos = random.randint(1,nb_cards), you know you have q_pos -1 'A' cards before it and nb_cards - q_pos after.

This becomes :

def shuffle(nb_cards):
    q_pos = randint(1,nb_cards)
    return ['A'] *  (q_pos -1) + ['Q'] + ['A'] * (nb_cards - q_pos)


A different strategy would be to create a list of 'A's and just put Q somewhere.

def shuffle(nb_cards):
    cards = ['A'] * nb_cards
    q_pos = randint(0,nb_cards-1)
    cards[q_pos] = 'Q'
    return cards