Login and Register ×
Check your Email for the OTP
Python Programming Language MCQ Python Errors and Exceptions Handling
⚠ Report ✓ Question Verified Copy Link
x = [1.0, 2.0, 3.0] print(x[2.0])
Explanation:
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Input In [68], in () 1 x = [1.0, 2.0, 3.0] ----> 2 print(x[2.0]) TypeError: list indices must be integers or slices, not float
Related Topic:
Share Above MCQ
Learn More MCQ Questions from Python Programming Language MCQ Python Errors and Exceptions Handling