Computer Science, asked by khushiiiiii4137, 4 months ago

predict the following print(''72''*2)

Answers

Answered by atrs7391
1

The output of print(''72''*2) is:

7272

Answered by Oreki
1

\textsf{\large \textbf{Given Snippet}}

   \texttt{print("72" * 2)}

\textsf{\large \textbf{Explanation}}

   \text{In Python we can multiply sets of words, strings, or tuples.}\\\text{So, any str mutilped by a scalar like 1, 2, 3 etc will result in concatenation }\\\text{of the string \textit{n} times where \textit{n} is the number multiplied with.}\\\text{If the string is multiplied by a number less than or equal to 0, it returns an}\\\text{empty string.}

\textsf{\large \textbf{After Execution}}

   \texttt{7272}

Similar questions