Define a function that takes a list and adds 32 to the end of it.
Write a function which takes a set and another argument, s and a, and adds a to s.
Create a dictionary, files, with 'py', 'txt', 'jpg', 'csv' mapping to 'Python file', 'Text file', 'JPEG image', 'Comma-separated values file' respectively.
Write a function which takes a tuple and returns its first 3 elements.
Write a function which takes a tuple and returns its element before the last.
What is the main difference between a list and a tuple in Python?
|  Lists are immutable, tuples are mutable | ||
|  Tuples are immutable, lists are mutable | ||
|  Tuples can hold elements of only the same type |
def return_char(s, n):
index = len(s) - n
return s[index]
Given the above script, what are the results of the following expressions:
| return_char("zanatek", 2): | ||
| return_char("zanatek", 3): |
def return_char(s, n):
index = len(s) - n
return s[index]
Given the above script, what are the results of the following expressions:
| return_char("python", 1): | ||
| return_char("python", 3): |
Complete execution flow of the following program
>>>
Complete execution flow of the following program
def are_equal(s1, s2): return s1 == s2