Post

Python Developer
Python Developer@Python_Dv·
🤔🚀 Comment your answers below! 👇
Python Developer tweet media
English
16
6
30
5.3K
Sergei Kotov
Sergei Kotov@kotov_dev·
Answer: C) True The trap: "False" is a STRING, not a boolean! › bool("False") converts string to boolean › Non-empty strings = True › Even "False", "0", or "No" are True as strings For beginners: Only empty string "" interpreted as False. ANY text (even "False") is truthy!
English
0
0
4
324
Laxman 🧮🐧
Laxman 🧮🐧@CodeWithBinary·
@Python_Dv Answer: C) True For string, Boolean conversion checks emptiness. For example: bool("") # False bool(" ") # True bool("False") # True bool("0") # True
English
1
0
3
380
Kamal Gurjar
Kamal Gurjar@KamalGurjar8·
@Python_Dv C — True bool("False") → True because the string is not empty.
English
0
0
1
147
ANKIT 𓃱
ANKIT 𓃱@A9kitSingh·
@Python_Dv C) True because in Python, even "False" believes in itself. Empty string = False. Any other string = optimistic.
English
0
0
1
138
Karathanasis Athanasios
Karathanasis Athanasios@k_athanasi·
@Python_Dv This one’s tricky if someone confuse strings with booleans or expect Python to parse the word “False” 😅 Python checks string existence (non empty), not meaning. bool("False") ➜ True Answer: C)True
English
0
0
1
139
Gizzy Codes
Gizzy Codes@GafarIb42311292·
@Python_Dv The answer is C. True This is because strings are always True, inasmuch as it's not an empty string. So this prints True 👍
English
0
0
0
35
Paylaş