Section 1

Preview this deck

String function length

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

1

Favorites

0

Last updated

6 years ago

Date created

Mar 14, 2020

Cards (14)

Section 1

(14 cards)

String function length

Front

LEN

Back

String Format Method

Front

Back

Check String

Front

To check if a certain phrase or character is present in a string, we can use the keywords in or not in.

Back

Split

Front

The split function in python takes a 'list" and creates an array from the items on the list.

Back

List

Front

a collection which is ordered and changeable. Allows duplicate members.Written with square brackets

Back

Accessing Dictionary Items

Front

1. Place key name inside of square brackets 2. Use Get function key.get(term)

Back

Python Delete Functions

Front

1. Remove 2. Pop(returns removed item) 3. Del

Back

string methods

Front

1. Strip: removes any whitespace from the beginning or the end 2. Lower: lower() method returns the string in lower case 3.Upper: upper() method returns the string in upper case 4.Replace: replace() method replaces a string with another string 5.Split: split() method splits the string into substrings if it finds instances of the separator

Back

partition function

Front

The partition function can take a list or string and partition it based on the first occurrence of the data in the argument. (as an example if the argument has a ' comma ' it will partition the string at the first comma. This will occur at every occurence of the argument

Back

Slicing

Front

Allows you to return a 'range' of items for lists. Syntax:print(b[2:5])

Back

Set

Front

is a collection which is unordered and unindexed. No duplicate members.Created between curly brackets {}

Back

Dictionary

Front

is a collection which is unordered, changeable and indexed. No duplicate members.

Back

Tuple

Front

A restrictive immutable Python list is known as a "tuple" and is created by assigning values as a comma-separated list between parentheses

Back

Comprehension

Front

Provides a concise method for creating lists

Back