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

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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 (?) , you can switch to a simple comment.
Switch to a voting comment New
Avidulam
Highly Voted 4 years, 1 month ago
There will be two elements, the answer should be A
upvoted 20 times
...
LearningOnlyWay
Highly Voted 4 years ago
correct answer is A almost 20% answers are wrong on this site
upvoted 15 times
...
TheFivePips
Most Recent 4 months, 2 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
10 months, 1 week ago
It prints ['don't think twice', ' do it!']
upvoted 1 times
...
macxsz
1 year, 11 months ago
Selected Answer: A
answer: A. two
upvoted 1 times
...
AEscajeda
2 years, 10 months ago
Actually list1 doesnt exist, the definition is List1.
upvoted 2 times
...
Jyotishri
2 years, 10 months ago
Answer should be A
upvoted 1 times
...
themeister
2 years, 11 months ago
A is correct.
upvoted 1 times
...
OnsYedes
3 years, 6 months ago
list="don't think twice, do it!".split(',') print(len(list)) output===>2
upvoted 4 times
...
Spectra
3 years, 7 months ago
2 elements
upvoted 1 times
...
imsaad
3 years, 9 months ago
Answer should be A
upvoted 2 times
...
Amritansh
3 years, 10 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, 1 month 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 ...