Post

Python Developer
Python Developer@Python_Dv·
🤔🚀 Comment your answers below! 👇
Python Developer tweet media
English
61
10
135
13.5K
Jenny
Jenny@JennyTheDev·
@Python_Dv B) 6 P-y-t-h-o-n → 6 characters len() counts every character in the string, no tricks here
English
1
0
5
1.1K
Earnest Codes
Earnest Codes@Earnesto037·
@Python_Dv Answer: B) 6 The variable is assigned the string value "Python". In Python, the len() function is used to return the number of items in an object. For a string, it counts the total number of characters, including letters, numbers, spaces, and punctuation. The word
English
1
0
4
280
Jay
Jay@learnaiwthme·
@Python_Dv B) 6 Because "Python" has six characters.
English
1
0
2
779
Sergei Kotov
Sergei Kotov@kotov_dev·
@Python_Dv Answer: B (6) For beginners: len() counts characters in a string! › "Python" = P-y-t-h-o-n = 6 letters Also it works on lists, tuples, dicts too: › len([1,2,3]) = 3 › len("") = 0 (empty string) It counts elements in any structure, not bytes.
English
0
0
1
595
Kamal Gurjar
Kamal Gurjar@KamalGurjar8·
@Python_Dv Output: B) 6 ✅ len("Python") counts characters, not letters vs bytes. P-y-t-h-o-n → 6 characters
English
0
0
1
642
ANKIT 𓃱
ANKIT 𓃱@A9kitSingh·
@Python_Dv Answer: B) 6 "Python" has six characters (P y t h o n), so len(x) returns 6.
English
0
0
1
187
Unicorn Ranch .dev
Unicorn Ranch .dev@unicornRanchDev·
@Python_Dv Great quiz! The length of x = 'Python' is 6 because len() counts all characters. Beginners often confuse this with zero-based indexing, where the first character is index 0. Understanding this distinction is key to mastering strings in Python!
English
0
0
0
3
Laxman 🧮🐧
Laxman 🧮🐧@CodeWithBinary·
@Python_Dv B) 6 Step-by-step: 1. A string is assigned to variable x: "Python" contains 6 characters 2. len() is a built-in function It returns the number of characters/items in a sequence (string, list, tuple, etc.) 3. Prints the length of the string : 6
English
0
0
0
7
Nikhil
Nikhil@Coder645753·
@Python_Dv B , as there are 6 characters in the word Python.
English
0
0
0
4
Gizzy Codes
Gizzy Codes@GafarIb42311292·
@Python_Dv The answer here is B. 6 This is because the len function "len()" is used to get the length of a string , and here we're looking for the length of the string "Python", so it starts the numbering from 1 (P) to 6 (n) 👍
English
0
0
0
17
Ehshanulla
Ehshanulla@Ehshanulla·
@Python_Dv The string "PYTHON" contains 6 characters: so output= 6
English
0
0
0
22
Python Tech
Python Tech@PythonTech43716·
@Python_Dv B) 6 is the right ✅️ This basic length function simply gives number of elements present in character.
English
0
0
0
149
Paylaş