← BYTES
Python·Starter·Ref: 6.1.12

What does `"a,b,c".split()` return (with no argument)?

Have a question about this video? Mention reference 6.1.12 when you contact us.

a.["a", "b", "c"]
b.["a,b,c"]
c.An error, since split() requires an argument
d."a b c"
With no separator given, `str.split()` with no argument would split on whitespace -- but since "a,b,c" has no whitespace, it returns the whole string as a single-element list: ["a,b,c"].

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES6112#Python