i want to check if the string is number and if it is to replace it with spacebar [closed]

Your else statement is a call to isdigit function, and you discard the result. The block statement that follows is outside of the if-else statement (whose if part isn’t shown) and is thus executed regardless of that condition (which isn’t shown).

else will be executed and check if it is a number if it is then …

In order to do something if some condition applies, you can use an if statement. You can have an if statement within an else statement.

Browse More Popular Posts

Leave a Comment