<jupyter_start><jupyter_text>q1<jupyter_code>my_name = 'carlson'
print (my_name)<jupyter_output>carlson<jupyter_text>q2<jupyter_code>my_id = '321321'
print (my_id)<jupyter_output>321321<jupyter_text>q3<jupyter_code>my_id_str = '321321'
print (my_id_str)<jupyter_output>321321<jupyter_text>q4<jupyter_code>my_name = 'carlson'
my_id = 321321
print (my_name + my_id)
No, because it has to be an str not an int.<jupyter_output><empty_output><jupyter_text>q5<jupyter_code>print (my_name + my_id_str)
Yes, the result is that both of them are combined.<jupyter_output><empty_output><jupyter_text>q6<jupyter_code>'hello, world. This is my first python string.'.split('.')
print ('hello, world. This is my first python string.'.split('.'))<jupyter_output>['hello, world', ' This is my first python string', '']<jupyter_text>q7<jupyter_code>str_list = ['a','b','c','d','e']
str_list.sort()
print (str_list)
No, because the list is already sorted.<jupyter_output><empty_output><jupyter_text>q8<jupyter_code>str_list.append('f')
print (str_list)<jupyter_output>['a', 'b', 'c', 'd', 'e', 'f']<jupyter_text>q9<jupyter_code>str_list.remove('d')
print (str_list)<jupyter_output>['a', 'b', 'c', 'e', 'f']<jupyter_text>q10<jupyter_code>print (str_list[2])<jupyter_output>c<jupyter_text>q11<jupyter_code>num_list = ['12','32','43','35']
print (str_list + num_list)
Yes, the result is both of the lists combined together.<jupyter_output><empty_output><jupyter_text>q12<jupyter_code>my_dict = {'name':'Sam',
           'id':1234}
print(my_dict)<jupyter_output>{'name': 'Sam', 'id': 1234}<jupyter_text>q13<jupyter_code>my_dict['name']='Carlson'
print(my_dict)<jupyter_output>{'name': 'Carlson', 'id': 1234}<jupyter_text>q14<jupyter_code>print (my_dict['id'])<jupyter_output>1234<jupyter_text>q15<jupyter_code>my_dict['id']=432432
print(my_dict)<jupyter_output>{'name': 'Carlson', 'id': 432432}<jupyter_text>q16<jupyter_code>my_dict['num_list'] = num_list
print(my_dict)
The number list was added to the dictionary.<jupyter_output><empty_output><jupyter_text>q17<jupyter_code>num_list.sort()
print (num_list)
print (num_list[0])
print (num_list[3])<jupyter_output>['12', '32', '35', '43']
12
43
{'fraction_non_alphanumeric': 0.17365269461077845, 'fraction_numerical': 0.048825426070935055, 'mean_word_length': 11.134078212290502, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, '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': '17', 'dir': 'jupyter-structured-clean-dedup', 'id': '373436', 'license': 'MIT', 'n_tokens_mistral': 1023, 'n_tokens_neox': 955, 'n_words': 138, 'path': 'lab2.ipynb', 'repo_name': 'carlsondorman/IA241', 'size': '2171'}