0

X="a" x*=3 wat is the output

10th Jul 2017, 6:12 AM
Sharon Paul
Sharon Paul - avatar
7 Réponses
+ 11
@$Vengat Sure, I just wanted to mark that X != x Or in a Python syntax: X is not x ;)
10th Jul 2017, 6:52 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 9
To be perfectly clear, this would raise an exception, as the variable x is not initialized earlier. Mind that Python is case-sensitive ;)
10th Jul 2017, 6:42 AM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 4
@Kuba Let's assume it has been done earlier
10th Jul 2017, 6:43 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 4
Okay. Python is case sensitive
10th Jul 2017, 6:56 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 3
aaa. String*integer = integer repeats of string
10th Jul 2017, 6:22 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 2
Try it in the code playground and you will find out :) x*=3 is equivalent to x=x*3 . And for strings, * is a repetition operator.
10th Jul 2017, 6:18 AM
Bogdan Sass
Bogdan Sass - avatar
0
here in this code ........x="a" x*=3 print(X)like this so... i guess ..it should be....a3 but i fail code output gives err .......i dont understand whats the exact output
10th May 2020, 8:19 PM
priyanka rajput