#remove the whitespace characters
i.strip()
#remove the empty spcace
nkeys = i.replace(' ', ',')
I'm having a bit of trouble trying to understand what's going on here. From what I understand, strip() should remove all whitespace from the string, but then you try to replace all spaces with ','s. If you just removed all the whitespace, shouldn't there be no spaces?
I'm having a bit of trouble trying to understand what's going on here. From what I understand, strip() should remove all whitespace from the string, but then you try to replace all spaces with ','s. If you just removed all the whitespace, shouldn't there be no spaces?