Split String Python
file='/home/folder/subfolder/my_file.txt'
file_name=file.split('/')[-1].split('.')[0]
Tremendous Enceladus
file='/home/folder/subfolder/my_file.txt'
file_name=file.split('/')[-1].split('.')[0]
text= 'Love thy neighbor'
# splits at space
print(text.split())
grocery = 'Milk, Chicken, Bread'
# splits at ','
print(grocery.split(', '))
# Splitting at ':'
print(grocery.split(':'))