Computer Science

What will be the output produced?

s = 'Sipo'  
s1 = s + '2'
s2 = s * 2  
print(s1) 
print(s2)

Python

Python Data Handling

10 Likes

Answer

Sipo2
SipoSipo

Working

  1. s1 = s + '2' concatenates 'Sipo' and '2' storing 'Sipo2' in s1.
  2. s2 = s * 2 repeats 'Sipo' twice storing 'SipoSipo' in s2.

Answered By

7 Likes


Related Questions