I need to strip leading and trailing whitespace, split string into list to remove excess whitespace between words and uppercase all values within one Python code block and calculation in Pro field calculator. I have the following code block started (below). I'm trying to identify the best way to account for all these stored variables before return of the final string value.
address =
fieldcalc(!address!)
def fieldcalc(address):
str1 = address.upper()
str2 = address.strip()
str3 = address.split(" ")
finalstr = ???
return finalstr
Example bad string value: " String is fixed " Final String Value: "STRING IS FIXED"