Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25%
- Ends In
00:00:00
Coupon code:
SAVE25
X
Welcome to Pass4Success
Login
|
Sign up
-
Free
Preparation Discussions
Mail Us
support@pass4success.com
Location
PL
MENU
Home
Popular vendors
Salesforce
Microsoft
Nutanix
Cisco
Amazon
Google
CompTIA
SAP
VMware
Oracle
Fortinet
PeopleCert
Eccouncil
HP
Palo Alto Networks
Adobe
ISC2
ServiceNow
Dell EMC
CheckPoint
Discount Deals
New
About
Contact
Login
Sign up
Home
Discussions
Python Institute Discussions
Exam PCAP-31-03 Topic 8 Question 71 Discussion
Python Institute Exam PCAP-31-03 Topic 8 Question 71 Discussion
Actual exam question for Python Institute's PCAP-31-03 exam
Question #: 71
Topic #: 8
[All PCAP-31-03 Questions]
Which of the following invocations are valid? (Select two answers)
A
sorted ('python'')
B
'python' .sort ( )
C
sort' ('python')
D
'python' ,find (' ')
Show Suggested Answer
Hide Answer
Suggested Answer:
A, D
by
Malcolm
at
Aug 03, 2024, 02:57 AM
Limited Time Offer
25%
Off
Get Premium PCAP-31-03 Questions as Interactive Web-Based Practice Test or PDF
Contribute your Thoughts:
Submit
Cancel
Lemuel
3 months ago
Because 'sort' is a method that can be called on a list, and 'find' is a method that can be called on a string.
upvoted
0
times
...
Celia
3 months ago
Why do you think B and D are valid?
upvoted
0
times
...
Lemuel
3 months ago
I disagree, I believe B and D are the valid ones.
upvoted
0
times
...
Edgar
3 months ago
A) and B) are the way to go. But if you ask me, the real question is why we're still using Python 2 syntax in 2023. Time to upgrade, folks!
upvoted
0
times
Francine
3 months ago
Time to upgrade, folks!
upvoted
0
times
...
Darrin
3 months ago
A) and B) are the way to go.
upvoted
0
times
...
...
Helene
3 months ago
You know, if I had a nickel for every time I've seen a question like this, I'd be rich enough to buy a new computer to take the test on.
upvoted
0
times
Gilberto
3 months ago
C) sort\' (\'python\')
upvoted
0
times
...
Cassie
3 months ago
A) sorted (\'python'')
upvoted
0
times
...
...
Beth
4 months ago
D) is definitely not valid. What's with the random comma and the empty string? Whoever wrote this question is trying to confuse us.
upvoted
0
times
...
Margo
4 months ago
I'm surprised C) is not a valid option. It looks like a valid function call to me. Maybe the Python gods are playing tricks on us.
upvoted
0
times
Gearldine
2 months ago
D) \'python' ,find (\' \')
upvoted
0
times
...
Mica
2 months ago
User Comment: I'm surprised C) is not a valid option. It looks like a valid function call to me. Maybe the Python gods are playing tricks on us.
upvoted
0
times
...
Alton
3 months ago
B) \'python\' .sort ( )
upvoted
0
times
...
Zoila
3 months ago
A) sorted (\'python'')
upvoted
0
times
...
...
Celia
4 months ago
I think A and C are valid invocations.
upvoted
0
times
...
Willow
4 months ago
A) and B) are the valid options. sorted() is a built-in function that returns a new sorted list, while .sort() is a list method that modifies the list in-place.
upvoted
0
times
Dierdre
3 months ago
B) \'python\' .sort ( )
upvoted
0
times
...
Wei
3 months ago
A) sorted (\'python')
upvoted
0
times
...
...
Delsie
4 months ago
I agree with Adelina, B is incorrect. A and C are the valid invocations.
upvoted
0
times
...
Adelina
4 months ago
But 'python'.sort() is not a valid invocation, it should be sorted('python').
upvoted
0
times
...
Keneth
4 months ago
I disagree, I believe B and D are the correct ones.
upvoted
0
times
...
Adelina
4 months ago
I think A and C are valid invocations.
upvoted
0
times
...
Log in to Pass4Success
×
Sign in:
Forgot my password
Log in
Report Comment
×
Is the comment made by
USERNAME
spam or abusive?
Commenting
×
In order to participate in the comments you need to be logged-in.
You can
sign-up
or
login
Save
Cancel
az-700
pass4success
az-104
200-301
200-201
cissp
350-401
350-201
350-501
350-601
350-801
350-901
az-720
az-305
pl-300
Lemuel
3 months agoCelia
3 months agoLemuel
3 months agoEdgar
3 months agoFrancine
3 months agoDarrin
3 months agoHelene
3 months agoGilberto
3 months agoCassie
3 months agoBeth
4 months agoMargo
4 months agoGearldine
2 months agoMica
2 months agoAlton
3 months agoZoila
3 months agoCelia
4 months agoWillow
4 months agoDierdre
3 months agoWei
3 months agoDelsie
4 months agoAdelina
4 months agoKeneth
4 months agoAdelina
4 months ago