π§ Python MCQ Question
βWhat will be the output of the following? >>print(bool([]))
βWhat will be the output of the following? >>print(bool([]))
Anonymous Poll
23%
True
40%
False
16%
[ ]
21%
None
β
Correct Answer: B) False
πExplanation:
An empty list [] is considered falsy in Python.
bool([]) converts the list to its Boolean value, which is False.
React β€οΈ if you got it Right
πExplanation:
An empty list [] is considered falsy in Python.
bool([]) converts the list to its Boolean value, which is False.
React β€οΈ if you got it Right
π§ Python MCQ Question
βWhat will be the output of the following? >>print(",".join(["a", "b", "c"]))
βWhat will be the output of the following? >>print(",".join(["a", "b", "c"]))
Anonymous Poll
31%
abc
20%
a,b,c
24%
a, b, c
24%
['a','b','c']
β
Correct Answer: B) a,b,c
πExplanation:
The join() method concatenates elements of the list using the string before the dot as a separator.
So ",".join(["a", "b", "c"]) joins the list with commas: "a,b,c".
React β€οΈ if you got it Right
πExplanation:
The join() method concatenates elements of the list using the string before the dot as a separator.
So ",".join(["a", "b", "c"]) joins the list with commas: "a,b,c".
React β€οΈ if you got it Right
π§ Python MCQ Question
βWhat will be the output of the following? >>print(type({}))
βWhat will be the output of the following? >>print(type({}))
Anonymous Poll
19%
<class 'list'>
26%
<class 'set'>
44%
<class 'dict'>
11%
<class 'tuple'>
β
Correct Answer: C) <class 'dict'>
πExplanation:
In Python, {} creates an empty dictionary, not a set.
An empty set must be created using set().
So type({}) returns <class 'dict'>.
React β€οΈ if you got it Right
πExplanation:
In Python, {} creates an empty dictionary, not a set.
An empty set must be created using set().
So type({}) returns <class 'dict'>.
React β€οΈ if you got it Right
π§ Python MCQ Question
βWhat will be the output of the following? >>print(len(set("hello")))
βWhat will be the output of the following? >>print(len(set("hello")))
Anonymous Poll
44%
5
25%
4
6%
3
25%
Error
β
Correct Answer: B) 4
πExplanation:
The string "hello" has the characters: h, e, l, l, o.
set("hello") removes duplicates: {'h', 'e', 'l', 'o'}.
len(...) returns the number of unique characters, which is 4.
React β€οΈ if you got it Right
πExplanation:
The string "hello" has the characters: h, e, l, l, o.
set("hello") removes duplicates: {'h', 'e', 'l', 'o'}.
len(...) returns the number of unique characters, which is 4.
React β€οΈ if you got it Right
π§ Python MCQ Question
βWhat will be the output of the following? >>print([0]*3)
βWhat will be the output of the following? >>print([0]*3)
Anonymous Poll
77%
[0, 0, 0]
7%
[3]
4%
[0]*3
11%
000
β
Correct Answer: A) [0, 0, 0].
πExplanation:
[0]*3 means repeat the list [0] three times.
So it creates a new list with three zeros: [0, 0, 0].
React β€οΈ if you got it Right
πExplanation:
[0]*3 means repeat the list [0] three times.
So it creates a new list with three zeros: [0, 0, 0].
React β€οΈ if you got it Right
π§ Python MCQ Question
βWhat will be the output of the following? >>print(all([True, 1, "non-empty"]))
βWhat will be the output of the following? >>print(all([True, 1, "non-empty"]))
Anonymous Poll
47%
True
17%
False
20%
"Not Empty"
15%
1
β
Correct Answer: A) True
πExplanation:
The all() function returns True only if all elements in the iterable are truthy.
True, 1, and "non-empty" are all considered truthy values in Python.
So all([True, 1, "non-empty"]) returns True.
React β€οΈ if you got it Right
πExplanation:
The all() function returns True only if all elements in the iterable are truthy.
True, 1, and "non-empty" are all considered truthy values in Python.
So all([True, 1, "non-empty"]) returns True.
React β€οΈ if you got it Right
π§ Python MCQ Question
βWhat will be the output of the following? >>print("Hello" * 3)
βWhat will be the output of the following? >>print("Hello" * 3)
Anonymous Poll
54%
HelloHelloHello
18%
Hello*3
25%
Hello Hello Hello
3%
Error
β
Correct Answer: A) HelloHelloHello
πExplanation:
In Python, multiplying a string by an integer repeats the string that many times. So "Hello" * 3 results in the string 'HelloHelloHello'. There's no space added automatically.
React β€οΈ if you got it Right
πExplanation:
In Python, multiplying a string by an integer repeats the string that many times. So "Hello" * 3 results in the string 'HelloHelloHello'. There's no space added automatically.
React β€οΈ if you got it Right
π ANNOUNCEMENT π
π 30 Days, 30 Python Pattern Programs Challenge! π₯
Hey everyone! π
I'm super excited to announce that I'm starting a brand-new Python Pattern Program Challenge on my YouTube channel "Techbywebcoder" ! π₯π
π Starting from [1 August 2025]
π 1 New Pattern Program Every Day for 30 Days
π Covering:
β Star Patterns
β Number Patterns
β Alphabet Patterns
β Logic Building
β Interview-Ready Programs
β With Code, Output & Full Explanation!
Whether you're a beginner learning Python or preparing for coding interviews, this series will help you master loops, logic, and pattern building.
π Subscribe and turn on notifications so you donβt miss a single day!
https://youtube.com/@techbywebcoder?si=8sEJYTR68KVlr3Ed
π¬ Letβs learn together and level up our Python skills β one pattern at a time!
π Drop a comment if you're excited or have a pattern suggestion
π 30 Days, 30 Python Pattern Programs Challenge! π₯
Hey everyone! π
I'm super excited to announce that I'm starting a brand-new Python Pattern Program Challenge on my YouTube channel "Techbywebcoder" ! π₯π
π Starting from [1 August 2025]
π 1 New Pattern Program Every Day for 30 Days
π Covering:
β Star Patterns
β Number Patterns
β Alphabet Patterns
β Logic Building
β Interview-Ready Programs
β With Code, Output & Full Explanation!
Whether you're a beginner learning Python or preparing for coding interviews, this series will help you master loops, logic, and pattern building.
π Subscribe and turn on notifications so you donβt miss a single day!
https://youtube.com/@techbywebcoder?si=8sEJYTR68KVlr3Ed
π¬ Letβs learn together and level up our Python skills β one pattern at a time!
π Drop a comment if you're excited or have a pattern suggestion
Day 1: Easy Soild Square Pattern in Python | 30 Days of Code Challenge
Tutorial Video : - https://youtube.com/shorts/tN9Cb7tPXP0
Source Code : - https://github.com/TechbyWebCoder/Python_Pattern
Follow For More....!!
Tutorial Video : - https://youtube.com/shorts/tN9Cb7tPXP0
Source Code : - https://github.com/TechbyWebCoder/Python_Pattern
Follow For More....!!
Day 2: Easy Hollow Square Pattern in Python | 30 Days of Code Challenge
Tutorial Video : - https://youtube.com/shorts/W4qP2fsY0-E
Source Code : - https://github.com/TechbyWebCoder/Python_Pattern
Follow For More....!!
Tutorial Video : - https://youtube.com/shorts/W4qP2fsY0-E
Source Code : - https://github.com/TechbyWebCoder/Python_Pattern
Follow For More....!!
Day 3: Easy Right-Angled Triangle Pattern in Python | 30 Days of Code Challenge
Tutorial Video : - https://youtube.com/shorts/F18_YQEl51I
Source Code : - https://github.com/TechbyWebCoder/Python_Pattern
Follow For More....!!
Tutorial Video : - https://youtube.com/shorts/F18_YQEl51I
Source Code : - https://github.com/TechbyWebCoder/Python_Pattern
Follow For More....!!
Day 4: Easy Inverted Right-Angled Triangle Pattern in Python | 30 Days of Code Challenge
Tutorial Video : - https://youtube.com/shorts/n7x5kYLdkeU
Source Code : - https://github.com/TechbyWebCoder/Python_Pattern
Follow For More....!!
Tutorial Video : - https://youtube.com/shorts/n7x5kYLdkeU
Source Code : - https://github.com/TechbyWebCoder/Python_Pattern
Follow For More....!!
Day 5: Easy Right-Aligned Triangle Pattern
in Python | 30 Days of Code Challenge
Tutorial Video : - https://youtube.com/shorts/tAokQFR5SmY
Source Code : - https://github.com/TechbyWebCoder/Python_Pattern
Follow For More....!!
in Python | 30 Days of Code Challenge
Tutorial Video : - https://youtube.com/shorts/tAokQFR5SmY
Source Code : - https://github.com/TechbyWebCoder/Python_Pattern
Follow For More....!!