Post

Python Developer
Python Developer@Python_Dv·
🤔🚀 Comment your answers below! 👇
Python Developer tweet media
English
31
9
91
10.7K
Earnest Codes
Earnest Codes@Earnesto037·
@Python_Dv Answer: A) '2222' The variable a is a string containing the character '2', and b is an integer with the value 3. Multiplication (a * b): In Python, when you multiply a string by an integer, it performs string repetition.  Thus, '2' * 3 results in the string '222'.
English
1
0
7
558
Kamal Gurjar
Kamal Gurjar@KamalGurjar8·
@Python_Dv Output A) '2222' Explanation: a is a string. a * b → '2' * 3 = '222' Then string concatenation: '222' + '2' = '2222'
English
1
0
5
861
Gizzy Codes
Gizzy Codes@GafarIb42311292·
@Python_Dv The answer is A. This is because we're printing "a" which is a string of 2 multiplied by 3, this gives '222' then we added a ('2'). Then all together, this gives '2222'👍
English
0
0
2
164
Kunj Shah
Kunj Shah@gopal_kunj·
@Python_Dv A. Because string will multiply 3 times so aaa and then will add one more a
English
0
0
1
54
Jenny
Jenny@JennyTheDev·
@Python_Dv A) '2222' '2' * 3 = '222' '222' + '2' = '2222' String multiplication + concatenation
English
0
0
1
638
ANKIT 𓃱
ANKIT 𓃱@A9kitSingh·
@Python_Dv Answer: A) '2222' a is a string, so a * b repeats it: '2' * 3 → '222'. Then '222' + '2' concatenates, giving '2222'.
English
0
0
1
68
Ishaat Rahman Dipu
Ishaat Rahman Dipu@ishaat_Dipu_48·
@Python_Dv Output : '2222' [because '2' * 3 means 3 times '2'] , so the full output will be = '222'+ '2' = '2222'
English
0
0
0
1
Paylaş