s = "abc/def/efg 212 234 asjakj"result = s.split()[0].split('/')[0]print(result)
Standard input is empty
abc
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!