I think when we said we were going to make "Hello-world", I think it's better to use it like Source Code 1 Why can't source code 1 be executed and should I use source code 2 together? Is there a reason?
my_list = ["Hello", "world"]
print my_list.join("-")
my_list = ["Hello", "world"]
print "-".join(my_list)
The reasons are as follows:
all iterable is stories of being able to join
a list join, the (string)
tup join ()
, dict join ()
, join file. ()
means should be giving them. for
and so on all iterable join ()
Because you don't have to do this, join()
It's the same form as the current str.join()
© 2024 OneMinuteCode. All rights reserved.