How to properly represent a blank space in python

Currently working on using the equality operator to compare char to a blank space. Ive tried ‘’ and “” as well as leaving it blank. Upon searching google, I found “Isspace()” and that isnt working either. Anybody mind informing me how I do this?

Hello! @brandonb55

I have a simple code here to understand it…

Simple Example
# empty space in python

char0 = ''
char1 = ""
char2 = ' ' # using a space inside the quotes...
char3 = " "
print(f"Single quotes no space inside: hello!{char0}World")

print(f"Double quotes no space inside: hello!{char1}World")
print(f"Single quotes with space inside: hello!{char2}World")

print(f"Double quotes with space inside: hello!{char3}World")

Hope this helps… Happy Coding! :+1:

1 Like

Please post your actual code instead of a screenshot. Also, please post a link to the Step. thanks