why does this line of code not working
name = input("what is your name") if name = (Colby) print("hello brother")
comparison operator for equality is ==, or === if you also need to compare types. = is an assignment operator for assigning data on the right to the variable on the left. your code should be the following: name = input("what is your name?") if name == "Colby": print("hello brother")
you should write: " if name = ("Colby"): "
= is the assignment operator. you gotta use 'is' for comparison as in: if name is ('Colby'): print(' whaad up col dawg?!')