Concatenation joins two strings with +, preserving their order and creating a new string. Add any spaces or separators you want included: "one" + "two" produces "onetwo". section 8.2
Use concatenation to assemble text from smaller pieces, such as combining report sections or name fragments. The + operator can also join tuples, as when adding a newly found word to a tuple of valid words. section 8.2 section 19.2
Listing 12.4. Combining the names
newname1_first = lefthalf_name1_first.capitalize() + \ #1
righthalf_name2_first.lower() #2
newname1_last = lefthalf_name1_last.capitalize() + \
righthalf_name2_last.lower()
newname2_first = lefthalf_name2_first.capitalize() + \
righthalf_name1_first.lower()
newname2_last = lefthalf_name2_last.capitalize() + \
righthalf_name1_last.lower()
print("All done! Here are two possibilities, pick the one you like best!")
print(newname1_first, newname1_last) #3
print(newname2_first, newname2_last) #3
This name-mashup code joins capitalized and lowercase name halves to create new names. section 12.4









