Post

@Python_Dv Answer: C. ['Hello World']
The Python str.split() method takes an optional maxsplit argument, which specifies the maximum number of splits to perform. If maxsplit is set to 0, it means that no splitting will occur, and the original string is returned within a list.
English

@Python_Dv It’s C — ['Hello World']
Because split with 0 doesn’t split the string.
English

@Python_Dv 1. (string) function is used for manipulating strings.
2. The string 'Hello World' will be split into a list of 2 substrings separated by a space character " ".
3. Maxsplit = 0 denotes no. of splits
4. end="" ensures no newline character
5. Output will be ['Hello', 'World']
English

@Python_Dv C – ['Hello World']
maxsplit=0 means no split happens, the whole string stays in a single list element.
English

@Python_Dv C is the correct answer. Because string.split(separator, maxsplit).
If value of maxsplit = 0 then no split will hapeen so string will print as it is....
English












