If condition | SoloLearn: Learn to code for FREE!


If condition

List=[1,2,3,4] For ... (list)= 2 : Print ... What do I need to put in the blanks

7/27/2019 1:33:45 PM

Abdullah Alotaibi

6 Answers

New Answer


Check out https://www.sololearn.com/learn/Python/2435 What result are you trying to get?



Fill in the blanks to print the first element of the list, if it contains even number of elements list [1, 2, 3, 4] if ...... (list) % 2 == 0: print(list[....])


Abdullah Welcome to SoloLearn! You've finished one third of the Python course in 2 days. In my experience, that's too fast for the information to sink in. I would suggest starting over and practicing everything in the Code Playground as you go along (then you would probably know the answers yourself). James gave you the answers. To show that you understand the concepts of len(), x % 2 == 0, and index positions, I would invite you to explain why James's answers are correct! 😉


if not for sorry


len 0