51616/write-loop-that-prints-elements-list-their-position-the-list
Try this:
a = [4,7,3,2,5,9] for i in a: print("Element: " + str(i) + " Index: "+ str(a.index(i)))
a = [4,7,3,2,5,9] b = enumerate(a) for i in b: print(i)
Try using this question by list comprehension:
a=[4,7,3,2,5,9] print([x for x in enumerate(a)])
output:
[(0, 4), (1, 7), (2, 3), (3, 2), (4, 5), (5, 9)]
Here's the code: check = input("Enter the character: ...READ MORE
Hi, num_words_list = len(original_str.split()) original_str.split() - split words in ...READ MORE
The print() is getting called multiple times ...READ MORE
https://www.youtube.com/watch?v=mqaf7vj1AdA This link has the program. It uses ...READ MORE
If you write x.insert(2,3) and then print x ...READ MORE
Hey, @S, you can have a look at ...READ MORE
Hi, @There, Given an array of size n, ...READ MORE
Write a Python program that takes as ...READ MORE
Hi, it is pretty simple, to be ...READ MORE
To count the number of elements of ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.