Computer Science, asked by varunrathourpcu4cz, 1 year ago

Give the output of the following snippet:
Name= “Split-this-string”
Name.split(“-”)
a. [“Split”, “this”, “string”]
b. Split, this, string
c. [“Split-“, “this-“, “string”]
d. Split this string


varunrathourpcu4cz: photo dekh lo chahe ques post kia abi maine
varunrathourpcu4cz: ek aur kia dekho
varunrathourpcu4cz: nya ques nyi pic
varunrathourpcu4cz: adamkhor

Answers

Answered by Anonymous
5

Hi

a. [“Split”, “this”, “string”] is the correct answer.

Because separator string is used to determine from where we have to split the string, and it never gets included in result.


Please check screenshot for output.


 

Attachments:

SWEETLOVE: oohhh
Answered by SWEETLOVE
2
A IS THE R8 ANS

HOPE IT HELPS U

SWEETLOVE: hlo
SWEETLOVE: ^_^
SWEETLOVE: harsimrN i m f9
Similar questions