Question #599

What is the output of the code snippet below?
a = '2*3'
print(eval(a*2))

First, a*2 evaluates to 2*32*3 as the result of simple string concatenation. 2*32*3 then evaluates to 192 . (w3schools.com/python/gloss_python_string_concatenation.asp)


Comment on Disqus:

Question difficulty: 🔵🔵🔵🔵🔵