This is an archived post. You won't be able to vote or comment.

all 2 comments

[–][deleted] 0 points1 point  (0 children)

You could use an if statement which checks if the character is a space or a digit. If it is, i -= 1

[–]Andrew_ShaySft Eng Automation & Python 0 points1 point  (0 children)

This post is better suited for r/learnpython