predict output in python :
a="Amazing"
print(a[3:], "and", a[:2])
print(a[-7:] "and", a[-4:-2]
print(a[2:7], "and", a[-4:-1]
please send the right ans
Answers
Answered by
1
Answer:
Explanation: append and len in Python . ... Taking 50 different variables is not a good option and here comes list in action. ... So, index of 3 is 0, 4 is 1, 2 is 2 and 5 is 3. ... a = [4,9,6,2] print(a[0]) print(a[1]) print(a[2]) print(a[3]) ... [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] ... Now, try getting output of a[:3] , a[3:] and a[:]
Similar questions
English,
4 months ago
Geography,
8 months ago
Environmental Sciences,
8 months ago
Social Sciences,
1 year ago