What Will Be The Output Of The Following Python Code Snippetp #28
What will be the output of the following Python code snippet?</p> <pre><code class="language-python" line="1"> def example(a): a = a + '2' a = a*2 return a >>>example("hello") </code></pre>
This multiple choice question (MCQ) is related to the book/course
gs gs109 Python.
It can also be found in
gs gs109 Data Types & Numeric Types - Python Core Data Types - Quiz No.1.
What will be the output of the following Python code snippet?
def example(a): a = a + '2' a = a*2 return a >>>example("hello")
indentation Error
cannot perform mathematical operation on strings
hello2
hello2hello2