Python - Data Types as Values
Given the code below, what will be the output?
values = [1, 2.0, 3, 4.5]
result = sum(int(v) for v in values)
print(result)Given the code below, what will be the output?
values = [1, 2.0, 3, 4.5]
result = sum(int(v) for v in values)
print(result)15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions