string = 'foo.bar.test.ru'mylist = string.split('.')zone = mylist.pop()main = mylist.pop()print (zone)print(main)
Standard input is empty
ru
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!