1)What will be the output:
li=[1,2,3,4]
tup=(1,2,3,4,li)
li.append(6)
print(li)
print(tup)
Ans) [1, 2, 3, 4, 6]
(1, 2, 3, 4, [1, 2, 3, 4, 6])
2)What is a correct syntax to return the first character in a string?
Ans) x=“Hello”[0]
which method can be used to return a string in upper case letters?
Ans) upper() - string_name.upper()
Which collection is ordered , provide changes
Ans) list and dict are ordered and are changeable.
#Which statement is used to stop a loop
Ans) break