<jupyter_start><jupyter_text><jupyter_code>#Python Program to Remove the Duplicate Items from a List
def removeDuplicate(lst):
  b = set()
  unique = []
  for x in lst:
    if x not in b:
        unique.append(x)
        b.add(x)
  return unique
removeDuplicate([1,2,3,3,4,5,6])
#python program to convert tuple into string
tup = ('e', 'x', 'e', 'r', 'c', 'i', 's', 'e', 's')
str =  ''.join(tup)
print(str)
# Write a Python program to remove an empty tuple(s) from a list of tuples. Go to the editor
# Sample data: [(), (), ('',), ('a', 'b'), ('a', 'b', 'c'), ('d')]
# Expected output: [('',), ('a', 'b'), ('a', 'b', 'c'), 'd']
L = [(), (), ('',), ('a', 'b'), ('a', 'b', 'c'), ('d')]
L = [t for t in L if t]
print(L)
# Write a Python program to find the length of a set.
setn = {5, 10, 3, 15, 2, 20}
print("Original set elements:")
print(setn)
print(type(setn))
print("\nLength of the said set:")
print(len(setn))
#Write a Python program to find maximum and the minimum value in a set.
setn = {5, 10, 3, 15, 2, 20}
print("Original set elements:")
print(setn)
print(type(setn))
print("\nMaximum value of the said set:")
print(max(setn))
print("\nMinimum value of the said set:")
print(min(setn))
#Write a Python script to concatenate following dictionaries to create a new one.
dic1={1:10, 2:20}
dic2={3:30, 4:40}
dic3={5:50,6:60}
dic4 = {}
for d in (dic1, dic2, dic3): dic4.update(d)
print(dic4)
# Write a Python program to sum all the items in a dictionary. 
my_dict = {'data1':100,'data2':-54,'data3':247}
print(sum(my_dict.values()))
#Write a Python program to find the highest 3 values of corresponding keys in a dictionary.
from heapq import nlargest
my_dict = {'a':500, 'b':5874, 'c': 560,'d':400, 'e':5874, 'f': 20}  
three_largest = nlargest(3, my_dict, key=my_dict.get)
print(three_largest)<jupyter_output>['b', 'e', 'c']
{'fraction_non_alphanumeric': 0.2005464480874317, 'fraction_numerical': 0.04590163934426229, 'mean_word_length': 4.739811912225705, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '525470', 'license': 'Apache-2.0', 'n_tokens_mistral': 766, 'n_tokens_neox': 703, 'n_words': 245, 'path': 'List_Tuple_Set_Dict.ipynb', 'repo_name': 'anasuya3/PYTHON', 'size': '1830'}