Learn about senior full stack developer resume example, we have the largest and most updated senior full stack developer resume example information on alibabacloud.com
9. Dictionary dic,dic = {' K1 ': "v1", "K2": "V2", "K3": [11,22,33]}A. Please loop out all the keysFor I in Dic.keys ():Print (i)B. Please loop out all the value for inch dic.values (): Print (i)C. Please loop out all the keys and value for inch Dic.items (): Print (I,J)D. Add a key-value pair in the dictionary, "K4": "V4", and output the added dictionaryDic.setdefault ('K4','v4')print(DIC)E. In the modified dictionary, the value of "K1" corresponds to "Alex", Output the modified diction
16. Movie Scoring: The program gives a list of several movies that are currently being released. Voted by the user for each movie.Finally, the user's voting information is published in LST = [' Beijing meets Seattle ', ' Save Mr. Wu ', ' American past ', ' the beautiful legend of Sicily ']Result: {' Beijing meets Seattle ': 99, ' Save Mr. Wu ': 80, ' The American Past ': 6, ' The Beautiful Tales of Sicily ': 23}LST = ['Beijing meets Seattle','Save Mr. Wu','The American past','the beautiful legen
11. The element classification has the following value li= [11,22,33,44,55,66,77,88,99,90], all values greater than 66 are saved to the first key of the dictionary, the value less than 66 is saved to the value of the second key.That is: {' K1 ': List of all values greater than 66, ' K2 ': List of all values less than 66}dic={'K1':[],'K2': []} li= [11,22,33,44,55,66,77,88,99,90] forIinchLi:ifI > 66: dic['K1'].append (i)Else: dic['K2'].append (i)Print(DIC)Python3.6
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.