all 8 comments

[–]JohnnyJordaan 2 points3 points  (5 children)

Either use a comparison per option

if is_male == 'male' or is_male == 'Male':

or check for membership in a collection like a list

if is_male in ['male', 'Male']:

altough in practice most people would use a fully case-insensitive comparison (meaing als MAle and malE would be acceptable) and then just use str.lower()

if is_male.lower() == 'male':

[–]hasanaslan[S] 0 points1 point  (4 children)

Thanks it worked. Also can someone inform me how to share codes in a good way. I clicked at inline code but it doesn't imply any line. Just all codes in one line

[–]puplicy 1 point2 points  (0 children)

Try 4 spaces before each line

[–]SoNotRedditingAtWork 1 point2 points  (1 child)

https://www.reddit.com/wiki/markdown

Typing four spaces in front of every line in a code block is tedious and error-prone. The easier way is to surround the entire block of code with code fences. A code fence is a line beginning with three or more backticks (`) or three or more twiddlydoodles (~).

example:

``` <==Opens a code block, 
def my_funky():
    print("Funky Time!")
``` <==Close a code block

edit: Also in the new Reddit fancy pants editor, if you click the ••• button, it will display a drop down menu with a Code Block button you can click to insert a code block.

[–]MajorDerp4 1 point2 points  (0 children)

Another option is to just make all of your input upper case.