i have a list:
row=['hi', 'there', 'how', ...........'some stuff is here are ','you']
as you can see row[8]='some stuff is here are '
if the last character is a space i would like to get everything except for the last character like this:
if row[8][len(row[8])-1]==' ':
row[8]=row[8][0:len(row[8])-2]
this method is not working. can someone suggest a better syntax please?