Print the values form giving starting range to end range in python list
View All Python Programs Source Code end=int(input(“Enter the end range : “)) end=5 thislist = [“apple”, “banana”, “cherry”, “orange”, “kiwi”, “melon”, “mango”] print(thislist[:end]) Output Enter the end range : 4 [‘apple’, ‘banana’, ‘cherry’, ‘orange’, ‘kiwi’] View All Python Programs
Print the values form giving starting range to end range in python list Read More »