def cellparser(cell):
cell=(cell.rstrip('\n'))
for character in cell:
if (character=='\"'):
character=""
if (character=="\'"):
character=""
for character in cell:
if (character=="\'") or (character=='\"'):
character=""
cell=cell.upper()
cell=cell.rstrip('\"')
cell=cell.rstrip("\'")
return cell
string=' "HELLO /" regarding those \' and \" \' quotes. They are annoying." '
print "string before modification is"
print string
print "string parsed immediately"
print cellparser(string)
print "string redefined"
string=cellparser(string)
print string
My output is still showing quotes in the center where I put those slashes....

New Topic/Question
Reply




MultiQuote




|