''' e-mail 1: e-mail 2: Purpose: print three words from a single input line in circular shift order ''' # get the words -- do not change this code ################# reply = input( 'Enter three words: ' ) w1, w2, w3 = reply.split() print() print( 'Before the shift w1, w2, and w3 are respectively: ', w1, w2, w3 ) print() # do a circular shift of w1, w2, and w3; e.g., if their values # were respectively from above 'apple', 'banana', and 'cucumber', # the print statement at the end should print out 'cucumber', # 'apple', and 'banana' # your code here ############### w1, w2, w3 = w3, w1, w2 # to perform the assignment, the right side is evaluated # first. it evaluates to the current values of w3, w1, # and w2 is respectively. The assignment operator then # assigns those values to w1, w2, and w3 respectively. # thus, a circular shift # report shift -- do not change this code ################## print( 'After the shift w1, w2, and w3 are respectively: ', w1, w2, w3 ) print()