Python rephactor
1. Write code that swaps the first and last elements in a list called my_list. Assume that the list has already been created and contains at least one element.
2.Write code that creates a Python set containing each unique character in a string named my_string. For example, if the string is 'hello', the set would be {'h', 'e', 'l', 'o'} (in any order). Assign the set to a variable named my_set. Assume that my_string has already been initialized.