python split by last code example Example: rsplit string from last 'sayanand'.rsplit('a', 2) >>> ['say', 'n', 'nd']