""" Rsplit. Usually rsplit() is the same as split. The only difference occurs when the second argument is specified. This limits the number of times a string is separated. So: When we specify 3, we split off only three times from the right. This is the maximum number of splits that occur. Source:#http://www.dotnetperls.com/split-python """ In : s="Obama,President,USA,Ajay,cam,cyber" In : s.rsplit(",",3) Out: ['Obama,President,USA', 'Ajay', 'cam', 'cyber'] In : s.split(",",3) Out: ['Obama', 'President', 'USA', 'Ajay,cam,cyber'] In : s = "foo bar foobar foo" In : s.split(None,2) Out: ['foo', 'bar', 'foobar foo']Learn python for fun.The popular blog with questions and answers to the python.Solutions to facebookhackercup,codejam,codechef.The fun way to learn python with me.Building some cool apps.