Write a function that takes one string and, using slices, prints the last 2 characters of it.
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 |
your_str = "Why-not"
Split your_str using hyphen ("-") as delimiter, and assign each string to a variable.
What does the * operator do a tuple and an integer?
|  It multiplies each element inside the tuple by the integer | ||
|  It adds the integer to each element of the tuple | ||
|  It repeats the entire tuple that many times | ||
|  It creates a set with repeated elements |
Define a function that takes a list and adds 32 to the end of it.
Write a function that takes no arguments and returns a dictionary with 6 elements, where keys are floats and values are integers.
Define a function that takes one list as argument and returns its last element.
mixed = ["Traukni", ["Babrruja", 0], "Carralluke", "Xerxe"]
Given the above script:
| How many elements does mixed have: | ||
| What is the second element of mixed: | ||
| What is type of the second element of mixed: | ||
| What is the last element of mixed: |
Complete execution flow of the following program
>>>
Complete execution flow of the following program
def lower(s): return s.lower() s1, s2 = 'python', 'Python' print(lower(s1)) s2 = lower(s2) print(s2)