Python Programming : Intermediate (Leaving Cert Computer Science): Flashcards

📚Flashcards
Python Programming : Intermediate
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

15 cards from this deck

Show

What does str.upper() do?

Converts all characters to uppercase

What does str.strip() do?

Removes leading and trailing whitespace

Starting index of strings in Python

0

String slicing [start:end] behavior

From start index up to but not including end

str.find(sub) return value if not found

-1

Escape character for newline

\n

Boolean 'and' operator result

True if both operands are true

Purpose of elif statement

Checks multiple conditions after if

Are Python lists mutable?

Yes, elements can be changed after creation

What does list.append() do?

Adds an element to the end of the list

list.pop() with no index specified

Removes and returns the last item

while loop execution condition

Executes while given condition is True

count += 1 equivalent to

count = count + 1

for loop purpose in Python

Iterates over iterable objects

range() function purpose

Generates a sequence of numbers

Join 100,000+ Leaving Cert students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.