ProgrammingEasyTCS NQT · Wipro pattern
What is printed?
What is printed?
print(bool("False"), bool(""), bool(0.0))- A. True False False
- B. False False False
- C. True False True
- D. False True False
Correct answer: A. True False False
Any non-empty string is truthy, including "False". The empty string and 0.0 are falsy.
More Python Programming questions
- What is printed? python nums = [3, 1, 2] print(nums.sort())
- What is printed? python print([x x for x in range(5) if x % 2])
- What is printed? python s = "hello" print(s[::-2])
- What is printed? python t = (1,) print(type(t).name, type((1)).name)
- What is printed? python def f(args, kw): print(len(args), len(kw)) f(1, 2, a=3)
- What is printed? python print(list(zip([1, 2, 3], "ab")))