Saturday, July 6, 2019

immutable type in python

firstTuple[0]="EGG"
print(firstTuple)

output::

NameError: name 'firstTuple' is not defined

example 2:

firstTuple="EGG"
print(firstTuple)

out put:
EGG


No comments:

Post a Comment

python class topic video