74.9k views
0 votes
What will be printed after the code below is ran: a = "123" b = "456" a = b + "123" b = a print(b + a)

User Angy
by
7.5k points

1 Answer

3 votes

Answer:

1158

Step-by-step explanation:

a = 123

b= 456

a = b + 123 [a = 456 + 123 = 579]

b = a [b = 579]

print(b + a)

output: 1158

P.S

If the variables have string values (because they have double-quotes around them), then the answer will be very different!

User Nickbusted
by
8.6k points

Related questions

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.