In this program I am using a a user input to select which alignment the user wnats to align some text, at present I'm usinf if statements like so...
if alignment == "Left":
line = left(new_string)
elif alignment == "Right":
line = right(new_string)
elif alignment == "Centre":
line = centre(new_string)
elif alignment == "Fully":
line = fully(new_string)
else:
print "Error."
However, is there a a way that i can get rid of these statements and just use the users input to call either the left, right, centre, fully functions.
Thanks JT