return value of [ ] for an 'if' or 'for' function
3 views (last 30 days)
Say I have any function and the input can be input = 123.
For this function, only numbers can work as the input or else the return value should be [ ].
So if i were to have input = 'abc', the return value would need to show [ ].
How can I do this? If the input passes that first test it needs to be able to run the rest of the code.
Here is something i tried, it did not work.
Distance = 'abc'
if Distance = lettersPattern
res = 
Additionally, how can i also link the part abvoe to another requisite. If the input is empty to say 'unknown'?
res = 'unknown'