Python
Libraries
Requests (Documentaton).
OS PATH (Doc)
Cheatsheet
Subprocess
Time
BeautifulSoup
Link tutorial. Web Scraping with Python Using Beautiful Soup
Functions
Startwith()
The startswith()
method returns True if the string starts with the specified value, otherwise False.
string.startswith(_value, start, end_)
value : Required. The value to check if the string starts with
start : Optional. An Integer specifying at which position to start the search
end : Optional. An Integer specifying at which position to end the search
Split()
the split()
method splits a string into a list. You can specify the separator, default separator is any whitespace.
Note: When maxsplit is specified, the list will contain the specified number of elements plus one.
string.split(separator, maxsplit)[0,1,2] etc to specify which item to show
separator : Optional. Specifies the separator to use when splitting the string. By default any whitespace is a separator
maxsplit : Optional. Specifies how many splits to do. Default value is -1, which is "all occurrences".
Join()
The join()
method takes all items in an iterable and joins them into one string. A string must be specified as the separator.
Rstrip()
The rstrip() method removes trailing spaces or characters from the right side of a string. The program will remove all white space characters by default if you do not specify a character to remove.
Last updated