''' This code is use for split a string ''' data = " Life#is#very#easy#with#Python " data=data.strip() words = [] words=data.split("#") print words
Output:
['Life', 'is', 'very', 'easy', 'with', 'Python']
''' This code is use for split a string ''' data = " Life#is#very#easy#with#Python " data=data.strip() words = [] words=data.split("#") print words
['Life', 'is', 'very', 'easy', 'with', 'Python']
0 comments:
Post a Comment