Define a function that takes one list as argument and returns its first element.
Write a function that takes two strings, s1, and s2, and returns True if s1 appears in s2 as substring.
Write a function that takes one string with more than 10 characters, and returns
its fifth to eighth (not including eighth) characters. Example:
>>> middle('programming')
'ram'
Write a function which takes a tuple and returns a its last 2 elements.
Write a function which takes a tuple and returns its element before the last.
Write a function which takes a set and another argument, s and a, and adds a to s.
for b in {1: 'po', 2: 'jo'}:
print(b)
Given the above script, what are the two printed values?
def return_char(s, n):
return s[n]
Given the above script, what are the results of the following expressions:
| return_char('llukar', 2): | ||
| return_char('xerxe', 0): | ||
| return_char('carralluke', 3): |
Complete execution flow of the following program
>>>
Complete execution flow of the following program
>>>