An early morning trek to Ghangad Fort

Ghangad is a short but exciting trek offering the thrill of trekking over difficult patches in portions and some heart trembling moments when you cling on to a thin wire of hope for support.
It great for training beginners. And the view is just splendid.

Duration : 30 mins - 40 mins

Why to choose this trek:

1) Great for only morning treks like Sinhagarh. It offers a mind view of two sides of the mountain .
2) Easy to reach. The route to Ghangad offers amazing landscapes from Tamini Ghat. So it's a bonus.
3) Don't need to plan ahead. Don't need to carry much stuff if you planning to return same day.
4) In rainy season, the waterfalls in the valley area are amazing. We plan to do it this rainy season.
5) Barely any crowd. We encountered no one. Absolute silence and just the wind blowing , animal sounds from the forest . It was just a trekker's dream come true.

Our Plan :

We started at 3:30 .
Climbed and reach back home by 12 AM .
It's an hour long journey . We went via Lonavala and came back by Tamini ghat. The roads are in good enough condition.  So no worries.

Ghangad Fort road
Road to the fort. The right side mountain is Ghangad fort.

Ghangad Fort Information boar
Information board 

Ghangad fort map
Map of the fort
Ghangad fort view sunrise
View of sunrise from the fort

Ghangad fort gate
The gate to the fort

The morning sun up from its sleep. Amazing view from Ghangad fort.
Panorama of the valley from Ghangad fort during sun rise
A huge fallen rock creating a cave. Best location for camping overnight.

View from inside the cave 
Our group 

At the gates

The landscape from the wall..This is shot of the valley behind the fort..Absolutely breath taking view.

Beside the water above..Me on the left..My friend Aditya on the right.
Panorama from the top of the hill..wide shot
On the top of the fort...amazing background

We walked towards the valley below...The view of the ghats from there are unbelievable.

Python List sorting with key argument explored

Everybody uses lists as an array to store values. List provide a lot of in-build features.

  • Sorting
  • Membership
  • Indexing
  • Iteration
  • reversing
  • Adding/Removing
  • Popping
  • Count

Lots of reasons to use lists. I think, one of the most used features is sorting. Internally , python uses Merge sort technique to sort the array items. But the sort method can be used in many other ways to have more control.

The python help says:

>>> help(list.sort)
Help on method_descriptor:

    L.sort(cmp=None, key=None, reverse=False) -- stable sort *IN PLACE*;
    cmp(x, y) -> -1, 0, 1

Things to note: The sort method doesn't return anything. It saves the changes in the list permanently. Thats why it is faster than the method sorted


>>> l = ['c', 'b', 'd', 'a']
>>> l.sort()
>>> l
['a', 'b', 'c', 'd']

If elements are strings, they gets sorted by alphabetical order.


>>> l = ['c', 'b', 'd', 'a']
>>> l.sort(reverse=True)
>>> l
['d', 'c', 'b', 'a']

Using the KEY argument.

Perhaps the most versatile of all is the "key" argument. The value of the key parameter should be a function that takes a single argument and it returns a key to use for sorting purposes. This technique is fast because the key function is called exactly once for each input record. 

Simple Sort

>>> l = ['c', 'b', 'd', 'a']
>>> l.sort(key=str, reverse=True)
>>> l
['d', 'c', 'b', 'a']

What above code shows is, I want to sort alphabetically by the rules of ascii , in reverse order. This is not so convincing I assume. Perhaps a much interesting example.

Sort by Length of string

>>> l = ['abc', 'b', 'ab']
>>> l.sort(key=len)
>>> l
['b', 'ab', 'abc']

In the above case, we are sorting by length of strings.

So we actually now have a list : [3, 1, 2] .

Hence the result,

['b', 'ab', 'abc']

Corresponding lengths: 

[1 , 2, 3]

Sort by case (Upper)

>>> l = ['abc', 'A', 'AB']
>>> l.sort(key=str.upper)
>>> l
['A', 'AB', 'abc']

When we specify str.upper, we are saying - Treat every element as UPPER CASE, then sort.

So we are sorting ['ABC', 'A', 'AB']

As a result, we get ['A', 'AB', 'ABC']

Sort by case (Lower)

>>> l = ['abc', 'A', 'B', 'b', 'AB']
>>> l.sort(key=str.lower)
>>> l
['A', 'AB', 'abc', 'B', 'b']

Sort by last letter

>>> strs = ['xc', 'zb', 'yd' ,'wa']
>>> strs.sort(key=lambda x: x[-1])
>>> strs
['wa', 'zb', 'xc', 'yd']

I want to sort by the last letter of each word. Essentially this is how we manually do it.

Step 1 : Extract last letter of each word and keep in a list
Step 2 : Sort that list
Step 3 : Relatively display the original list but sorted.

For the Step 1 , we have used a function created using lambda. This function accepts a string and returns it's last letter.

Zeros as least preference

I have a list of numbers with some zeros in it . I want to have the list sorted , but I also want all the zeros at the end.

Original list : l = [4,0,3,0,8,0,1]

Expected list after sorting: [1, 3, 4, 8, 0, 0, 0]

There are many ways to do it. I'll use what comes to my mind first.

>>> sorted(l, key=lambda x:str(x) if x == 0 else x)
[1, 3, 4, 8, 0, 0, 0]

Guess what's happening here? I am exploiting the fact that, as a preference, python will pick up integers first, then strings. So I converted 0 into '0'.
Here's the proof:

>>> ll = [3,2,3, '1', '3', '0']
>>> sorted(ll)
[2, 3, 3, '0', '1', '3']

Sorting a list of big string integers

I have a list of big huge integers in string form and I want sort that. The idea we can use here is:
We know a 2 length integer is likely to be bigger than a 1 length integer.

>>> l = ['1','2','3','56235434245634562345','556532', '84']
>>> sorted(l, key=lambda x: (len(x), x))
['1', '2', '3', '84', '556532', '56235434245634562345']

Essentially we are sorting a list of tuple.

>>> sorted([(1, 5), (1,2), (2, 0), (2, 4)])
[(1, 2), (1, 5), (2, 0), (2, 4)]

So minimal length numbers will get sorted first. Then next length follows and so on .

Need more guidance? I found the google developers guide to be very good. Have a look.

One day trip to Malshej Ghat

Maharashtra offers a host of choices when it comes to hills ,valleys and forts.  Activities like trekking or rappelling are most popular here. 

Malshej is one of those places that will offer you its own specialty. 

  • Rocky mountains, deep gorges, 
  • Beautiful tunnels , roads snaking around. 
  • Uncountable waterfalls.
  • Dense forest and its habitat. 

It's a power package for a day. One day escape from the daily hassles of life. Western Ghats for you ladies and gentlemen.

How to reach:

A road trip will be the best option. You don't want to miss the chance of stopping anywhere you want and click pictures or just stare in awe. 

How to plan:

  1. Start at early morning 6 AM.
  2. Reach Malshej in 3 hrs.
  3. Straight away park at the MTDC.
  4. Have break fast at the restaurant inside.
  5. Stroll behind the hotel . There is a beautiful pathway made for tourists.

Walk way around the MTDC 

Find a good waterfall. Enjoy bathing in it. It's just awesome .

 Return home before night.

Best time to go:

Rainy season. June - August


Before you plan, check latest news about the place. It gets closed for days due to erratic landslides and various other natural disasters frequenting the area.

What to carry:

1) Camera with rain pouch.
2) Lots of water.
3) Change of clothes
4) Towels.
5) Food etc.


Don't plan staying . Its extremely costly during peak months (Min 4000-5000 Rs). At night , you can barely see or venture outside your hotel. A window facing room is of no good at such weather.

Total Pageviews