1file='/home/folder/subfolder/my_file.txt'
2file_name=file.split('/')[-1].split('.')[0]
1text= 'Love thy neighbor'
2
3# splits at space
4print(text.split())
5
6grocery = 'Milk, Chicken, Bread'
7
8# splits at ','
9print(grocery.split(', '))
10
11# Splitting at ':'
12print(grocery.split(':'))