2016-10-17 7 views
0

私はこのエラーを取得しています:サポートされていないオペランド%のためのタイプ(S):「NoneType」と「タプル」

TypeError: unsupported operand type(s) for %: 'NoneType' and 'tuple'

を私はこの問題を解決するために変更する必要がありますか?

string_1 = "Sean"; 
string_2 = "beginner programmer"; 

print("Hi my name is %s, I\'m a %s.") % (string_1,string_2); 
+0

を印刷前に文字列をフォーマットする必要があります;' Pythonですべての行の末尾。 Pythonはインデントされた構文を使用する – MooingRawr

答えて

3

print戻りNone、また、あなたが `必要はありませんそれを

print("Hi my name is %s, I\'m a %s." % (string_1, string_2)) 
関連する問題