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.
私は2つの数字のタプルを持っています、
例えば:data = (0.25, 0.25)
data = (0.25, 0.25)
これを次のような文字列に変換したい:
025and025
「。」なし。
In [55]: data = (0.25, 0.25) In [56]: 'and'.join([str(item).replace('.','') for item in data]) Out[56]: '025and025'