=-Alice Bob-S-Charis David Eric-Flurry-
S1 = s.split ( "-", - 1) # to "-" is divided, the number of divisions is not limited to -1, to define a number of other numbers, such as 1 to 1, 12 to 12 times.
print (. ( "{} + {}") format (s1 [0], s1 [-1])) # string [0: i] bit string of the first to i-1 bits
"" "Alice + Flurry
String split combination
Guess you like
Origin www.cnblogs.com/oycc2000/p/11228897.html
Ranking