Ranked Function In Python Geeks