How to add an application to a list with PyWinAuto?

Instead of applications.extend(app) Add the current window to list like this :
applications.append(GetForegroundWindow())

And later use it like this (I mean activating the browser windows) :
SetForegroundWindow(applications[0])

Both the Functions are the implementation win32gui.