Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
s = "A Colon is beside me" print s,":"
私は取得する必要があります
コロンが私のそばにいます:
でも手に入れたい
>>>A Colon is beside me:
どのように?
文字列を連結します。
print s + ':'
または文字列フォーマットを使用します:
print '{0}:'.format(s)
Python 3 ではprint()、スペースの代わりに複数の引数の間に空のセパレーターを使用するように関数に指示することもできます。
print()
print(s, ':', sep='')