statements operators functions string methods set methods tuple methods dict methods file methods list methods exceptions exception types comprehensions multidimensionals os lambdas subprocess
Intro to Python

Session 1 Session 2 Session 3 Session 4 Session 5 Session 6 Session 7 Session 8 Session 9




pythonreference.com

search statements, functions, methods, exceptions*

hide categories

'elif' statement if the prior 'if' is False and this test is True, enter the block
'else' statement if all prior if/elif tests in this chain are False, enter the block
'if' statement if test is True, enter the block
'in' membership test with strings determine whether a substring is in another string
'not' test inverter negates a test to be False (if test is True) and True (if test is False)
'while' statement execute block repeatedly until test is False (or 'break' is encountered)
break exit a looping block and continue execution below it
continue jump loop execution to the top of a looping block
f'' (format) string insert values into a string template
str.count() return int number of occurrences of a substring in this string
str.endswith() return True if this string ends with a substring
str.find() return int index of substring within this string
str.isdigit() return True if this string is all digit characters
str.lower() return a copy of this string, lowercased
str.replace() return a string after search and replace
str.startswith() return True if this string ends with a substring
str.upper() return a copy of this string, uppercased