Home / MCQ Bank / Computer
Computer Lists In Python

Write a list comprehension equivalent for the Python code shown below. for i in range(1, 101): if int(i*0.5)==i*0.5: print(i)

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • [i for i in range(1, 101) if int(i*0.5)==(i*0.5)]

Related Computer Questions

Which of the following does not use a crawler to find pages for the search result? Which of these method of InputStream is used to read integer representation of next available byte input? Which node is the child node of the Node D in the following ternary tree? Which of the following is advantage of using JDBC connection pool? On which of the following statements does the time complexity of checking if an edge exists between two particular vertices is not, depends?