codes = ["A", "B", "C", "D", "E"]
random.shuffle(codes)
def print_message(message):
print "\n"
print "-"*10
print message
print "-"*10
print "\n"
print_message('This is a test of the %s system' % codes[0])
How do I then do an if statement for the results of the print_message('This... ') based on the random letter that is presented.
Example. If the result of codes[0] ended up being "A" for the print_message() then you would see this printed on the screen:
----------
This is a test of the A system.
The A system is really great.
---------
Run the command a few more times and you'd see:
----------
This is a test of the C system.
The C system sucks.
----------
----------
This is a test of the B system.
The B system has improved greatly over the years.
----------