# Write a python function that returns the index of the smallest element in a list
def indexOfSmallestElement(numbers):
smallest_index = []
for element in range (len(numbers)):
element = numbers.index(min(numbers))
smallest_index = element + 1
return smallest_index
def getIndexOfSmallest():
list1 = [17, 33, 6, 5, 12, 9, 37, 49]
print(indexOfSmallestElement(list1))
getIndexOfSmallest()
4
# Write the python to print dublicate elements in the list.
Names = ["Jane", "Aaron", "Jane", "Cindy", "Aaron","NICK","nick"]
for i in range(0, len(Names)):
for j in range(i+1, len(Names)):
if(Names[i] == Names[j]):
print(Names[i]);
Jane Aaron
# Write the python code to find the given name is Palindrome or not.
def isPalindromicList(a):
return a == a[::-1]
a = input("Enter a name :")
ans = isPalindromicList(a)
if ans:
print(a,", Is a Palindrome")
else:
print(a,", Is not a Palindrome")
ANNA , Is a Palindrome