I've been learning Python,but I have the slightest idea of how to use it in automation testing? Does anyone have any experience with Python for automation testing? please give me a few tips.
You need to find a tool or api that supports automation.
For example.. you can use Sikuli which is Jython based for screen cap based automation. Since the tool has it's own Python interpreter, you can write Python code in it. For webtesting, you can find Python bindings for Selenium that'll allow you to automate browsers.
A popular framework many python automators use is Robot Framework, the test fixtures are written in Java, and there are a several open source libs for various types of automation for Robot framework.