Post

@Python_Dv B) 6
P-y-t-h-o-n → 6 characters
len() counts every character in the string, no tricks here
English

@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

@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

@Python_Dv Output: B) 6 ✅
len("Python") counts characters, not letters vs bytes.
P-y-t-h-o-n → 6 characters
English

@Python_Dv Answer: B) 6
"Python" has six characters (P y t h o n), so len(x) returns 6.
English

@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

@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

@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

@Python_Dv The string "PYTHON" contains 6 characters:
so output= 6
English

@Python_Dv B) 6 is the right ✅️
This basic length function simply gives number of elements present in character.
English



























