Name

.split()

Examples
alphabet = 'a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z'
for letter in alphabet.split(','):  # Split letters by ','.
    print(letter)  # Print each letter on a separate line.
Description The method split() returns a list of all words in the string using the provided separator. An optional second argument limits the number of splits.
Syntax
str.split(sep)
str.split(sep,num)
Parameters
sepstring to split words by
numnumber of elements to split
Related string
String Formatting
.find()
.join()
.split()
.replace()
Updated on Sun Nov 26 15:34:43 2017.
Creative Commons License