0
What is the result of this code?
What is the result of this code? letters = ["a", "b", "c"] letters.append("d") print(len(letters)) _
10 odpowiedzi
+ 12
The result should be: 4.
After the 2nd statement, "d" is added to the list. So, letters contains 4 items.
+ 9
4
+ 8
Ruby Quiz Question
Oh.. no that mine I submitted it to Sololearn and it approved.(Notice just now in submission)
+ 3
The answer is 4. as the "append" part adds your required value at the end of the pre-defined list , thus after using append it becomes a part of the list from the end.
+ 2
Lists almost behaves like strings. So 4
0
It prints 4, because the list end as follows: letters = ["a", "b", "c", "d"]
0
4
0
yes 4
0
4 🙂
- 1
what is the result of this code?
List=["vahid", "eslami", [" Iran", "tehran]]
print(List[2][1][-3])