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

f'' (format) string insert values into a string template
slice with a string slice a string by index (character position)
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.join() join a list of strings into a string
str.lower() return a copy of this string, lowercased
str.replace() return a string after search and replace
str.rstrip() remove "whitespace" or other characters from right side of string
str.split() divide a string into a list of strings
str.splitlines() split a "multiline" string on newline
str.startswith() return True if this string ends with a substring
str.upper() return a copy of this string, uppercased