Enrollments Open for Advanced Certification Courses on Data Science, ML & AI by E&ICT Academy IIT Roorkee
We can access elements of the tuple using square brackets but we can't reassign the value because tuples are immutable. We can also slice the tuples to get multiple elements using the indices as the range.
t = (1,3,5,2,54,34,2,34,5)
l = len(t)
Enter the result
t2 = t[2:5]
What will be the sum of elements present in t2?
t3 = t[1:3] + t2[:]
What will be the sum of elements present in t3?
No hints are availble for this assesment
Answer is not availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed