Exams.RecruitmentIndia.in

A Learning Portal from Recruitment India

  • Home
  • Questions
    • Aptitude Questions
    • English Questions
    • Technical Questions
    • HR Interview Questions
    • Reasoning Questions
    • GK Questions
    • Current Affairs
    • Entrance Exams
  • IT Jobs By Location
    • Ahmedabad
    • Bangalore
    • Chandigarh
    • Chennai
    • Coimbatore
    • Delhi
    • Gurgaon
    • Hyderabad
    • Kolkata
    • Lucknow
    • Mumbai
    • Noida
    • Pune
    • Vizag
    • Vijaywada
  • Govt Jobs Portal
  • Online Tests Portal
  • Contact Us
New
Latest Private Jobs 2022 || Today Walkins || Latest Central Govt Jobs
New Recruitment India Job Notifications & Preparation Portal App || RecruitmentIndia Online Mock tests app
You are here: Home / Question and Answers

What will be the output of the following Python code?

odd=lambda x: bool(x%2)
numbers=[n for n in range(10)]
print(numbers)
n=list()
for i in numbers:
if odd(i):
continue
else:
break

A. 

[0,2,4,6,8,10]

B. 

[0,1,2,3,4,5,6,7,8,9]

C. 

[1,3,5,7,9]

D. 

Error

Answer
Workspace
Report
Discuss

Answer with explanation

Answer: Option B

Explanation

the code shown above returns a new list containing whole numbers up to 10(excluding 10). Hence the output of the code is : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9].

Workspace

Discuss about the question Cancel reply

Search

State Wise Govt Jobs

  • Andhra Pradesh Govt Jobs
  • Arunachal Pradesh Govt Jobs
  • Assam Govt Jobs
  • Bihar Govt Jobs
  • Chattishgarh Govt Jobs
  • Goa Govt Jobs
  • Gujarat Govt Jobs
  • Haryana Govt Jobs
  • Himachal Pradesh Govt Jobs
  • Jammu and Kashmir Govt Jobs
  • Jharkhand Govt Jobs
  • Karnataka Govt Jobs
  • Kerala Govt Jobs
  • Madhya Pradesh Govt Jobs
  • Maharashtra Govt Jobs
  • Tripura Govt Jobs
  • Uttar Pradesh Govt Jobs
  • Uttarakhand Govt Jobs
  • Manipur Govt Jobs
  • Meghalaya Govt Jobs
  • Mizoram Govt Jobs
  • Nagaland Govt Jobs
  • Odisha Govt Jobs
  • Punjab Govt Jobs
  • Rajasthan Govt Jobs
  • Sikkim Govt Jobs
  • Tamilnadu Govt Jobs
  • Telangana Govt Jobs
  • West Bengal Govt Jobs

Advertisement

Useful Links

  • About Us
  • Privacy Policy
  • Disclaimer Policy
  • Contact Us

Our Android Applications

  • Preparation & Job Updates App
  • Download Online Mock Tests App

Copyright © 2016 -2022 Exams Recruitment India || Product from Recruitment India Made with ❤ in India.