How to check if the string is empty in Python?

Empty strings are “falsy”, which means they are considered false in a Boolean context, so you can just do this –

Leave a Reply