前提・環境
- Python 3.5.1
- Mac に Homebrew で Python 3 をインストールした。
- 【Mac】【Homebrew】Python 3 をインストールする手順【かなり試行錯誤した】 – oki2a24
Python 3 コード
- paizaコーディングスキルチェックの値取得・出力サンプルコード | ITプログラマー・エンジニア転職のpaiza の Python 3 版
# coding: utf-8
を追加raw_input()
ではなくinput()
を使用xrange
ではなくrange
を使用
input_lines = int(input()) for i in range(input_lines): s = input().rstrip().split(',') print("hello = "+s[0]+" , world = "+s[1])