Professional Documents
Culture Documents
Practical No - 4
Practical No - 4
Aim : -
Software used: - Python
print(t)
Output: -
Output: -
Output: -
Question 4 – negative indexing
Implementation: -
t = ("a", [0, 2,26], (12, 2, 3),"c",[1,4,7,0])
print(t[0])
print(t[-1][2])
print(t[-4][-3]
Output: -
Question 5 – Slicing
Implementation: -
t = ("a", [0, 2,26], (12, 2, 3),"c",[1,4,7,0])
print(t[-4:-2])
Output: -
Output: -
Question 7 – max() function
Implementation: -
t1=("apple","kiwi","orange","cherry","mango")
print (max(t1))
Output: -
Output: -