+ 1

Can someone help me pls ???

How to output the only value which is a number

20th Dec 2021, 12:05 PM
K1auDIa KaDaM0UR0
K1auDIa KaDaM0UR0 - avatar
3 Antworten
+ 5
What do you mean "the only value which is a number"
20th Dec 2021, 12:17 PM
MATOVU CALEB
MATOVU CALEB - avatar
+ 3
Use filter() to get matching values from Car.values(). You can use lambda combined with isinstance() to verify that type of lambda's argument was any numeric type (int, float).
20th Dec 2021, 1:11 PM
Ipang
0
Car = {'brand': 'BMW', 'year': 2018, 'color': 'red'} key = input() print(car[key])
20th Dec 2021, 12:08 PM
K1auDIa KaDaM0UR0
K1auDIa KaDaM0UR0 - avatar