Define a function, more_than_n(word, n), that returns True if word has more than n letters.
Define a function that takes one list as argument and returns its second to last element (the element before the last).
Define a function, more_than_5(word), that returns True if word has more than 5 letters, False otherwise.
s1 = {1, 1, 1}
s2 = set('pse')
| s1: | ||
| s2: |
Write a function, to_upper which takes a string as argument and returns the uppercase version of the string.
Write a function that takes one dictionary and another argument, d and a, and returns True if a appears in d as value. It returns False otherwise.
Define a function that takes one list as argument and returns its last element.
words = {"pse": "why", "ani": "ok", "ani": "okay"}
words["no"] = "jo"
words["ani"] = "alright"
words["po"] = "yes"
| What is the final value of words: | ||
| What is the final number of elements of words: | ||
| What is the final value of "ani": |
Complete execution flow of the following program
>>>
Complete execution flow of the following program
print("Ani".isupper()) a = "ANI" res = a.isupper() print(res)