Python - Data Types as Values
You have a list of mixed numbers: nums = [1, 2.5, 3, 4.75, 5]. You want to create a new list with all numbers converted to integers by dropping decimals. Which code correctly does this?
You have a list of mixed numbers: nums = [1, 2.5, 3, 4.75, 5]. You want to create a new list with all numbers converted to integers by dropping decimals. Which code correctly does this?
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions