```
import os
import gspread
from oauth2client.service_account import ServiceAccountCredentials

# Google API の認証情報を使って認証する
scope = ['https://spreadsheets.google.com/feeds'、
         'https://www.googleapis.com/auth/drive'］

credentials = ServiceAccountCredentials.from_json_keyfile_name(
    os.environ['GOOGLE_API_CREDENTIALS'], scope)

# Google Sheets API の認証とアクセス
client = gspread.authorize(credentials)

# アクセスしたい特定のGoogleシートを開く
sheet = client.open("My Google Sheet").sheet1

# シートの行を繰り返し処理する
for row in sheet.get_all_values()：
    print(row)
```

My Google Sheet "をアクセスしたいGoogleシートの名前に置き換え、os.environ['GOOGLE_API_CREDENTIALS']をGoogle API認証ファイルのパスに置き換えてください。また、pip を使用して gspread および oauth2client ライブラリをインストールする必要があります。
import os
import gspread
from oauth2client.service_account import ServiceAccountCredentials

# Use your Google API credentials to authenticate
scope = ['https://spreadsheets.google.com/feeds',
         'https://www.googleapis.com/auth/drive']

credentials = ServiceAccountCredentials.from_json_keyfile_name(
    os.environ['GOOGLE_API_CREDENTIALS'], scope)

# Authenticate and access the Google Sheets API
client = gspread.authorize(credentials)

# Open the specific Google Sheet you want to access
sheet = client.open("My Google Sheet").sheet1

# Iterate over the rows in the sheet
for row in sheet.get_all_values():
    print(row)

Make sure to replace "My Google Sheet" with the name of the Google Sheet you want to access, and replace os.environ['GOOGLE_API_CREDENTIALS'] with the path to your Google API credentials file. You will also need to install the gspread and oauth2client libraries using pip.