Python Programming: Intermediate (Leaving Cert Computer Science): Flashcards
📚Flashcards
Practise the cards
10 cards from this deck
ShowHide
Practise the cards
10 cards from this deck
Method in Python
Method in Python
Function accessed from an object
str.upper() result
str.upper() result
Converts all chars in string to uppercase
str.strip() result
str.strip() result
Removes leading & trailing whitespace
String indexing starts at
String indexing starts at
0
str.find(sub) returns if not found
str.find(sub) returns if not found
-1
\n escape character
\n escape character
Newline
'and' operator returns True when
'and' operator returns True when
Both operands are True
Mutable list means
Mutable list means
Elements can be changed after list created
list.append() does
list.append() does
Adds element to end of list
Infinite loop cause in while loops
Infinite loop cause in while loops
Not incrementing the counter variable
