Python Forum
Help me understand variable value
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help me understand variable value
#1
Hello!

I recently stumbled upon a python course and a test of sorts, there is a question:

What is the value of C?

T = 3
v = "ab"
C = T *v

To which I replied that the value is ababab

I was corrected and told that the value is 'ababab'

Can you help me understand why this is the case? Thank you
Reply


Messages In This Thread
Help me understand variable value - by rkreis - Feb-15-2025, 11:21 AM
RE: Help me understand variable value - by buran - Feb-15-2025, 05:11 PM
RE: Help me understand variable value - by Sece1967 - Feb-19-2025, 03:57 AM
RE: Help me understand variable value - by popejose - Feb-19-2025, 12:09 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020