Answers for "declaring an empty string in python"

3

create empty function python

# Correct way of writing empty function 
# in Python
def fun(): 
    pass
Posted by: Guest on June-02-2021
3

how to check empty string in python

my_empty_string = ''  # given the empty string a variable

def check_empty():
    if not my_empty_string: 
        print("Empty")
    else:
        print("Not Empty")


check_empty()



# by George Kwabena
Posted by: Guest on September-01-2020

Python Answers by Framework

Browse Popular Code Answers by Language