Help me with this Program

Write a program to add two lists index-wise. Create a new list that contains the 0th index item from both the list, then the 1st index item, and so on till the last element. any leftover items will get added at the end of the new list. Also iterate both lists simultaneously and display items from list2 in reverse order.

Sample Input:

list1 = [‘Ha’, ‘wel’, ‘t’, ‘pyth’]

list2 = [‘i’, ‘come’, ‘o’, ‘on’]

Sample Output:

[‘Hai’, ‘welcome’, ‘to’, ‘python’]

[‘on’, ‘o’, ‘come’, ‘I’]

MY CODE:
l1=float(input())
l2=float(input())
x=[i+j for i,j in zip(l1, l2)]
print(x)
def rev(l2):
return [y for y in reversed(l2)]
print(l2)

well my friend, there are a couple of errors i notice in first glance:

  • in 1-2 line, the way to input the list, try … l = eval(input())

  • in the last line, you have made the function rev, but arent using it, so making it print(rev(l2)) will make it look good
    all in all these are pretty neat keywords