Author: codertutor_3o6d0o

Python IF

IF statement IF statement – with the IF statement you can use optional parts like elif or else. The keyword elif is short for else if keyword. Examples >>> c = 10 >>> if c < 0: print('Negative value') elif c...

Python FOR

FOR statement The FOR statement iterates over the items of a list or a string, in the order that they appear in the list or string. Examples >>> my_list = ['Learn', 'python', 'language'] >>> for n in my_list: print(n) Learn python...

Python Range

Range function The Range function determine the number of iterations to be executed by FOR statement. The Range function cycle start with 0 and ends with the n-1 value. Examples Print range values >>> for c in range(3): print(c) 0 1...

Python Break

Break statement The Break statement is used in statements like for or while loop. If the condition is met, then you can use break statement to exit the loop. Examples >>> for n in range(1, 5): for x in range (3,...

Python Continue

Continue statement The Continue statement is used in statements like for or while loop. If the condition is met, then you can use continue statement to continue the loop. Examples >>> x = 3 >>> for c in range(1,8): if x...