text="hello|python|world"print(text.split("|"))aa=text.split("|")print(aa[0])print(aa[-1])print(aa[0]+" "+aa[-1])
Standard input is empty
['hello', 'python', 'world'] hello world hello world
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!