当从许多子字符串中创建一个字符串时,哪个更 Pythonic - + 或 %?
big_string = string1 + string2 + ... + stringN
big_string = ''
for i in range(n):
big_string+=str(i)
或者
big_string = "%s%s...%s" % (string1, string2, ... , stringN)
big_string = ''
for i in range(n):
big_string = "%s%s" % (big_string, str(i))