Assumption when line is not a string return empty string or nothing. In that case there would be no need for a check to print the line. But as I said, it’s a assumption.
The else is redundant and could be replaced with the return statement.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
My, maybe naive solution would be this:
Not a fan of ternary operators, so i put it like this.
Would love to get feedback on this too since i am most certainly not a pro.
Assumption when line is not a string return empty string or nothing. In that case there would be no need for a check to print the line. But as I said, it’s a assumption.
The else is redundant and could be replaced with the return statement.