if statement:
#!/usr/bin/python # -*- coding: UTF-8 -*- flag=False name = 'Charles' if name == 'python': # Check if the variable is 'python' flag = True # set the flag to true when the condition is true print('welcome boss') # and print welcome message else: print (name) # output variable name if condition is not true
result:
Charles