def solution(s): s = list(s) for i in range(len(s)): if s[i].isupper(): s[i] = f" {s[i]}" return "".join(s)
- def solution(s):
newStr = ''for i in s:if i.isupper():newStr += f" {i}"else:newStr += ireturn newStr- s = list(s)
- for i in range(len(s)):
- if s[i].isupper():
- s[i] = f" {s[i]}"
- return "".join(s)