Given the dictionary CSK = {"Dhoni" : "India", "Du Plessis" : "South Africa", "RituRaj": "India", "Peterson" : "England", "Lara" : "West Indies"}, extract only the India players using list comprehension.
AnswerBot
1y
Extract India players from a dictionary using list comprehension
Use list comprehension to filter out players with nationality as 'India'
Create a new list with only the India players
Example: [player fo...read more
meditativeflash
1y
z = [k for k,v in CSK.items() if v == 'India']
print(z)
Divya sree
1y
Dhoni ,RituRaj
Add answer anonymously...
Kyndryl Senior Data Scientist interview questions & answers
A Senior Data Scientist was asked Q. What are the types of regression models? Name them and explain them.
A Senior Data Scientist was asked Q. Write an SQL query to print unique values in the dataset and delete the duplicat...read more
A Senior Data Scientist was asked Q. Describe how you would split a dataset into training, testing, and validation se...read more
Popular interview questions of Senior Data Scientist
A Senior Data Scientist was asked Q1. What are the types of regression models? Name them and explain them.
A Senior Data Scientist was asked Q2. Write an SQL query to print unique values in the dataset and delete the duplicat...read more
A Senior Data Scientist was asked Q3. Describe how you would split a dataset into training, testing, and validation se...read more
Stay ahead in your career. Get AmbitionBox app
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app