You can use driver.switchTo.frame(1);
here, the digit 1 inside frame() is the index of frames present in the webpage. as your requirement is to switch to second frame and the index starts with 0, you should use driver.switchTo.frame(1);
But the above code is in Java. In Python, you can use the below line.
driver.switch_to_frame(1);
UPDATE
driver.get("http://translate.google.com/translate?hl=en&sl=en&tl=ar&u=http://www.saltycrane.com/blog/2008/10/how-escape-percent-encode-url-python/");
driver.switchTo().frame(0);
System.out.println(driver.findElement(By.xpath("/html/body/div/div/div[3]/h1/span/a")).getText());
Output: SaltyCrane ???????
I have just tried to print the title name SaltCrane that is present inside the iframe. It worked for me except for the ? symbols after the SaltCrane. As it was arabic, it was unable to decode the same.
The above code is in Java. Same logic should also work in Python.