- 2
What is the output of this code print ( 3 * '7' )
Please say the answer faster
12 ответов
+ 12
Try finishing this lesson!
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2427/
Edit:
BADITHALA NAYAN PREETHAM it's easy to understand.
if you multiply a string by an integer, answer will be integer times string
Ex:
print(3*'7') =777 here,
3 = integer
'7' = string
That's it!
Understood?
+ 1
'7' when some datatype is in single or double quotes it is consider as string. For eg string='code' it is a string string='7' it is also a string .when string is multiplexed with (3 * '7') it prints the string 3 times 777 would be final output.hope u understand badithala nayan
+ 1
Thanks Mr.ajith
0
165
0
BeegCat But i got the answer 165...
https://code.sololearn.com/cbLCW3TzL48I/?ref=app
0
777
0
A string and an interger? 🙃🧐
0
It's already clarified man but thanks for responding
- 1
I read it but not understood