Is there a way to manipulate a string in Python using the following ways?
For any string that is stored in dot notation, for example:
s = \"classes.s
if '.' in s, s.rpartition('.') finds last dot in s, and returns (before_last_dot, dot, after_last_dot):
'.' in s
s.rpartition('.')
s
(before_last_dot, dot, after_last_dot)
s = "classes.students.grades" s.rpartition('.')[0]