Computer Science

Predict the output:

d = dict()
d['left'] = '<'
d['right'] = '>'
print('{left} and {right} or {right} and {left}')

Python Dictionaries

9 Likes

Answer

Output

{left} and {right} or {right} and {left}

Explanation

The argument of print function is a string as it is enclosed in single quotes. Hence, it will get printed as is on the screen.

Answered By

3 Likes


Related Questions