A program in python to convert all the characters into uppercase and lowercase and eliminate duplicate letters from a given sequence.

In the above Python program to convert all the characters into uppercase and lowercase and eliminate duplicate letters from a given sequence, we have used built-in functions upper() and lower() and then to list all the characters map() function is used.

def change_cases_char(s):
  return str(s).upper(), str(s).lower()
 
characs = {'e', 'u', 'B', 'G', 'a', 'E', 'T', 's', 'e'}
print("Original Characters are:\n",characs)
 
res = map(change_cases_char, characs)
print("\nAfter converting above characters in upper and lower cases \n and eliminating duplicate letters:")
print(set(res))
Sample Output:
Original Characters are:
 {'G', 'u', 'E', 'B', 'T', 's', 'e', 'a'}

After converting above characters in upper and lower cases 
and eliminating duplicate letters:
{('E', 'e'), ('U', 'u'), ('G', 'g'), ('B', 'b'), ('S', 's'), ('T', 't'), ('A', 'a')}