in Python by
Q:
How do you use the split() function in Python Language?

1 Answer

0 votes
by

Python Language’s split() function works on strings to cut a large piece into smaller chunks, or sub-strings. We can specify a separator to start splitting, or it uses the space as one by default.

#Example

str = 'pdf csv json'

print(str.split(" "))

print(str.split())

The output:

['pdf', 'csv', 'json']

['pdf', 'csv', 'json']

Click here to read more about Python
Click here to read more about Insurance

Related questions

0 votes
asked Aug 30, 2020 in Python by sharadyadav1986
0 votes
asked Aug 29, 2020 in Python by Robindeniel
0 votes
asked May 16, 2020 in Python by Robindeniel
0 votes
asked Aug 29, 2020 in Python by Robindeniel
0 votes
asked Aug 29, 2020 in Python by Robindeniel
...