<jupyter_start><jupyter_text>Lab 3: Data Containers  Question 1:<jupyter_code>num_list = [12,32,43,35]
num_list.sort()
print(num_list)
print(num_list[-1]) #Maximal Value
print(num_list[0]) #Minimal Value<jupyter_output>[12, 32, 35, 43]
43
12<jupyter_text>Question 2:<jupyter_code>str_demo='this is my third python lab.'
print(len(str_demo.split())) #Gives the number of words in sentence after split<jupyter_output>6<jupyter_text>Question 3:<jupyter_code>my_list = ['a','123',123,'b','B','False',False,123,None,'None']
print(set(my_list))  #Must convert list to set to retain only UNIQUE items
print(len(set(my_list)))  #Gives number of Unique items in set
print(list(set(my_list))) #Convert back to list<jupyter_output>{False, 'b', None, 'B', 'a', 'False', 123, 'None', '123'}
9
[False, 'b', None, 'B', 'a', 'False', 123, 'None', '123']<jupyter_text>Question 4:<jupyter_code>my_dict={
    'favorite_count':1138, #number
    'lang':'ch', #string
    'coordinates':(-75.14310264,40.05701649), #tuple
    'visited_countries':['GR','HK','MY'] #list
}
my_dict['lang']='en' #4.1: Change language to 'en'
print(my_dict)

print(len(my_dict['visited_countries'])) #4.2: Number of visited countries
my_dict['visited_countries'].append('CH')
print(my_dict) #4.3: Add 'CH' to visited countries
print ('US' in my_dict['visited_countries']) #4.4: FALSE: US is not in list
print(my_dict['coordinates'][0]) #4.5: Retrieves the first Coordinate using index
#4.6: Yes, you can change the coordinates by creating a new tuple, but you cannot change values of an existing tuple
#Example:
my_dict['coordinates']=(-81,45)
print(my_dict)<jupyter_output>{'favorite_count': 1138, 'lang': 'en', 'coordinates': (-81, 45), 'visited_countries': ['GR', 'HK', 'MY', 'CH']}
{'fraction_non_alphanumeric': 0.18093049971280872, 'fraction_numerical': 0.05686387133831131, 'mean_word_length': 7.58128078817734, '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': '165573', 'license': 'MIT', 'n_tokens_mistral': 726, 'n_tokens_neox': 663, 'n_words': 165, 'path': 'Lab3.ipynb', 'repo_name': 'bryntj/IA241', 'size': '1741'}