0

I am learning python where i come across below scenario

what actually happening internally in python can someone brief

My code :

a=10,
print(a)

Output coming as :

(10,)
codeholic24
  • 955
  • 4
  • 22

1 Answers1

0

a=10, is a tuple:

You can easily determine the type of the a using the type function as follows:

type(a)

Use a[0] to access the value 10:

a=10,
print(a[0])
Ahmad
  • 808
  • 9
  • 14