Xii CS
Xii CS
ii) Given three lists as list1 = [„p‟, „q‟,‟r‟], list2 = [„h‟,‟i‟,‟j‟]and list3 =
[„0‟,1‟,2‟]. Write a program that adds lists 2 and 3 to list1 as single element
each. The resultant list should be in the order of list3, Elements of list1,
list2. (2m)
iii) Find the output : (1m)
x= "wonderful nature"
print(x[:2], x[: -2], x[-2:])
print (x[6], x[2:4])
print (x[2: -3], x[-4:-21])