Show how printing behaves differently between Python 2 and Python 3, and write the Python 3 version of printing a list of numbers.
In Python 2, print was a statement. In Python 3, it is a function. That single change affected almost every script that people had already written.
The old statement form put everything that came after it into a tuple, and it printed each item with a space between them. The parentheses were only doing some grouping, and they were not a list of arguments.
Python 3 always treats the parentheses as a function call. That means printing a list shows the list itself. If you want one item on each line, you can loop over the list, or you can use the unpacking form of print together with a separator.
numbers = [3, 5, 7]
# Print one number on each line.
for number in numbers:
print(number)
# The unpacking form does the same job in one line.
print(*numbers, sep='\n')
# Python 3 shows the list with its brackets.
print(numbers)
The other difference that people meet in interviews is integer division. In Python 2, 7 / 2 gave 3, because both of the numbers were whole numbers. In Python 3 it gives 3.5, and if you want the floor result you write 7 // 2.
A third difference is the way strings work. Python 3 strings are Unicode by default, and the bytes and str types are kept strictly apart. You have to encode or decode text on purpose when you move it between text and raw bytes. That strictness is what makes Python 3 predictable about encoding.
If you are asked which version you would choose, answer Python 3 without hesitating. Be ready to explain that Python 2 reached the end of its life on 1 January 2020, under PEP 373.