Hi so I have a bunch of sentences and I want to clean them up and reform the sentences
I have this so far but I know there's a ways to go. Its been a while since I took python and I know its a loop issue but I'm stuck on next steps. Any tips are much appreciated!
r='hello. with us today is >John Smith from c-n-n.'
n=r.split()
for i in n:
if '>' in i:
x=i.replace('>','')
print(x)
if '.' in i:
x=i.replace('.','')
if '-' in x:
i=x.replace('-','').upper()
print(i)
else:print(x)
I want the end result to be : hello with us today is John Smith from CNN