Application of probability and statistics in machine learning MK

Time:2021-12-5

download:Application of probability and statistics in machine learning MK

employee_1 = {‘name’: ‘david’, ‘dept’: ‘ops’, ‘post’: ‘NOC’, ‘salary’: 12000, ‘id’: 113}
employee_2 = {‘name’: ‘brain’, ‘dept’: ‘auto’, ‘post’: ‘DBA’, ‘salary’: 13000, ‘id’: 115}
employee_3 = {‘name’: ‘chris’, ‘dept’: ‘search’, ‘post’: ‘PJM’, ‘salary’: 20000, ‘id’: 150}
employees = [employee_1, employee_2, employee_3]
for employee in employees:

employee['salary'] = employee['salary'] + 1000
print(employee['salary'])

Copy code
output

View Code
Nested list in dictionary

favorite_thing = {‘foods’: ‘cheese’, ‘drinks’: [‘milk’, ‘juice’, ‘whisky’]}
for drink in favorite_thing[‘drinks’]:

print("I love " + drink)

output

View Code
Dictionary nested list

Copy code
favorite_language = {‘brain’: [‘python’], ‘chris’: [‘c’, ‘ruby’], ‘david’: [‘power shell’], ‘tina’: [‘shell’, ‘go’, ‘c++’]}
for name, languages in favorite_language.items():

print("\n" + name.title() + " like programing language: ")
for language in languages:
    print(language.title())

Copy code
output

View Code

Recommended Today

The real problem of Alibaba IOS algorithm can’t hang up this time

More and more IOS developers continue to enter the peak of job hopping in 2020 Three main trends of interview in 2020: IOS bottom layer, algorithm, data structure and audio and video development Occupied the main battlefield. Data structure and algorithm interview, especially figure, has become the main reason for the failure of most first-line […]