'How do I access different tabs in a Google Sheets via the Google Sheets API?

I am trying to read a sheet from Google Drive using the Google Drive/Sheets API. I was wondering how to navigate between different tabs.

The tab is the circled part, (ignore the other stuff)
(source: cachefly.net)

(Ignore the other stuff, this is a random picture demonstrating what a tab is.)

Essentially, what I want to do is be able to access the other tabs and read the text that is there as well. Each tab is in the same format. I've been able to read from the first tab and would like to do the same for the others as well.

Here is my code:

import gspread
from oauth2client.service_account import ServiceAccountCredentials
import pprint


# Use credentials to interact with the Google Drive API
scope = ['https://spreadsheets.google.com/feeds',
         'https://www.googleapis.com/auth/drive']
credentials = ServiceAccountCredentials.from_json_keyfile_name(
    'foo', scope)
client = gspread.authorize(credentials)

# Opening the first sheet
sheet = client.open("Resume Data").sheet1

# Prints the code in a nicer format
pp = pprint.PrettyPrinter()


# Extract and print all of the values
list_of_resumes = sheet.get_all_records()

# Printing
pp.pprint(list_of_resumes)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source