Complete execution flow of the following program
def in_both(word1, word2): for letter in word1: if letter in word2: print(letter)
>>> in_both('abc', 'bcd') 'b' 'c' >>>
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 a string as an argument and displays the letters backward, one per line.
ⓘ
Write a function which takes three strings, s1, s2 and chars and returns True if all characters
of chars appear s1 or s2 (at least in one of them).
Example:
>>> appear_in_one_of_them("abc", "bcd", "abcd")
True
>>> appear_in_one_of_them("school", "home", "hlm")
True
>>> appear_in_one_of_them("world", "earth", "wem")
False
ⓘ
Using slices, print the first word of Nja mbas nja
ⓘ
Assign "Syni" to a variable.
Print S character of it.
ⓘ
Print 0th character of "Malet".
ⓘ
Complete execution flow of the following program
sentence = "I live here" print(sentence[2:6])
'live' >>>
Complete execution flow of the following program
def starts_with_the_same_letter(s1, s2): if s1[0] == s2[0]: return True return False
>>> starts_with_the_same_letter('ani', 'pse') >>> res = starts_with_the_same_letter('pristine', 'pse') >>> print(res) True >>>
There is a string assigned to word. Print its last character.
ⓘ