how to split python code example
Example 1: split string python
file='/home/folder/subfolder/my_file.txt'
file_name=file.split('/')[-1].split('.')[0]
Example 2: python split string
UserInputs = []
UserInputs = input().split()
file='/home/folder/subfolder/my_file.txt'
file_name=file.split('/')[-1].split('.')[0]
UserInputs = []
UserInputs = input().split()