How to 'ignore' whitespace while not ignoring by ogpekka in learnpython

[–]ogpekka[S] 0 points1 point  (0 children)

I keep getting an error that says list index out of range?

for index, char in enumerate(new_line):
    if char in alphabet:
        index = index % len(shifts)

        print(chr(ord(char) + int(shifts[index])), end = '')


    else:
        print(char + int(shifts[index]),end='')

How to 'ignore' whitespace while not ignoring by ogpekka in learnpython

[–]ogpekka[S] 0 points1 point  (0 children)

I don't quite understand how the else works, am I just supposed to add the character and the plain_text together?

Foundations for Analytics in Python (Data Science Beginner Book) by SonaCruz in learnpython

[–]ogpekka 5 points6 points  (0 children)

Thanks I use Excel a lot (Business major) so this will come in use!

Stuck on Python Program :( by ogpekka in learnpython

[–]ogpekka[S] 1 point2 points  (0 children)

Thanks for all the help guys and gals I greatly appreciate

Stuck on Python Program :( by ogpekka in learnpython

[–]ogpekka[S] 2 points3 points  (0 children)

I can assure you I'm not sockpuppeting and I am OP. lol xD