Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PCAP All Questions

View all questions & answers for the PCAP exam

Exam PCAP topic 1 question 52 discussion

Actual exam question from Python Institute's PCAP
Question #: 52
Topic #: 1
[All PCAP Questions]

How many elements will the list1 list contain after execution of the following snippet?

  • A. two
  • B. zero
  • C. one
  • D. three
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Avidulam
Highly Voted 4 years, 8 months ago
There will be two elements, the answer should be A
upvoted 20 times
...
LearningOnlyWay
Highly Voted 4 years, 7 months ago
correct answer is A almost 20% answers are wrong on this site
upvoted 15 times
...
TheFivePips
Most Recent 11 months, 3 weeks ago
string.split(separator, maxsplit) separator : Optional. Specifies the separator to use when splitting the string. By default any whitespace is a separator maxsplit : Optional. Specifies how many splits to do. Default value is -1, which is "all occurrences"
upvoted 2 times
...
Ello2023
1 year, 5 months ago
It prints ['don't think twice', ' do it!']
upvoted 1 times
...
macxsz
2 years, 7 months ago
Selected Answer: A
answer: A. two
upvoted 1 times
...
AEscajeda
3 years, 5 months ago
Actually list1 doesnt exist, the definition is List1.
upvoted 2 times
...
Jyotishri
3 years, 6 months ago
Answer should be A
upvoted 1 times
...
themeister
3 years, 6 months ago
A is correct.
upvoted 1 times
...
OnsYedes
4 years, 1 month ago
list="don't think twice, do it!".split(',') print(len(list)) output===>2
upvoted 4 times
...
Spectra
4 years, 2 months ago
2 elements
upvoted 1 times
...
imsaad
4 years, 4 months ago
Answer should be A
upvoted 2 times
...
Amritansh
4 years, 5 months ago
List1 = "don't think twice, do it!".split(',') print(List1) ["don't think twice", ' do it!'] correct answer is A which is two
upvoted 4 times
...
Tarun1
4 years, 8 months ago
this is wrong
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...