Using Strings-Parsing

Convert Comma Separated String To List Note, when you split a string on a character that it also ends with, you’ll end up with an empty string at the end of the list.

Read More

Using Strings-Extracting

Substring Convert string to value Get string from character position # (Remove text from beginning or end of string) Getting beginning of a string Getting end of string

Read More

Using Strings-Characters

String Characters A string is a list of characters Negative indices Negative indices count backward from the end of the string, so string_name[-1] is the last character of the string, etc Altering characters in a string Strings are immutable in Python, so you can’t do this: you have to do this instead: Work through each […]

Read More

Naming conventions in Python

Whilst you can do what you want, the creators of Python specify naming conventions that should be followed: ClassNamesInStudlyCaps CONSTANTS_IN_ALL_CAPS variable_names_in_snake_case method_names_in_snake_case function_names_in_snake_case

Read More

List comprehension

Combines a for loop into the creation of a new list based on an existing list. Adding conditional arguments if You simply add an if statement to the end: if else Examples Create list with 100 entries of 0 Create list with 100 random entries

Read More