<jupyter_start><jupyter_text>Lab 3  Q1<jupyter_code>num_list = [12, 32, 43, 35]

num_list.sort()
print(num_list)
print (num_list[-1])
print (num_list[0])<jupyter_output>43
12<jupyter_text>Q2<jupyter_code>str_demo="this is my third python lab."
print (len(str_demo.split())) # counts the number of words in this sentence<jupyter_output>6<jupyter_text>Q3<jupyter_code>my_list = ['a', '123', 123, 'b', 'B', 'False', False, 123, None, 'None']
print (set(my_list))
print (len(set(my_list)))
print (list(set(my_list)))<jupyter_output>{'b', False, '123', 'a', 'False', None, 'B', 123, 'None'}
9
['b', False, '123', 'a', 'False', None, 'B', 123, 'None']<jupyter_text>Q4<jupyter_code>my_dict= {
    'favorite_count':1138,
    'lang':'ch', # lang is key, ch is value
    'coordinates':(-75.14310264, 40.05701649),
    'visited_countries':['GR', 'HK','MY']
}
print (my_dict)
my_dict['lang']='en' # question 4.1
print (my_dict)
print (len(my_dict['visited_countries'])) # question 4.2
my_dict['visited_countries'].append('CH')
print (my_dict) # question 4.3
print ('US' in my_dict ['visited_countries']) # question 4.4
print (my_dict['coordinates'][0]) # question 4.5
my_dict['coordinates']= (-81, 45) # question 4.6
print (my_dict)<jupyter_output>{'favorite_count': 1138, 'lang': 'en', 'coordinates': (-81, 45), 'visited_countries': ['GR', 'HK', 'MY', 'CH']}
{'fraction_non_alphanumeric': 0.21158129175946547, 'fraction_numerical': 0.06755753526354863, 'mean_word_length': 7.120481927710843, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '634162', 'license': 'MIT', 'n_tokens_mistral': 623, 'n_tokens_neox': 560, 'n_words': 120, 'path': 'Lab3.ipynb', 'repo_name': 'mgbruce/IA241', 'size': '1347'}