1) Write a program to accept a list from the user and print the alternate element of list.
l1 = int(input("how many element you want to enter :"))
l2 = int(input("how many element you want to enter :"))
for i in range(l1):
print(i)
for j in range(l2,1):
print(j)
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
We have asked you before - please actually describe what is wrong with your code and where you are stuck. We aren’t here to fix your homework for you. We’re here to help you learn how to fix your own issues.