Tuples are similar to lists but are initialized slightly differently.
days = ('Mon', 'Tue', 'Wednes')
for d in days:
print("I am always tired on %sdays" % (days))
There is a big difference however: lists are mutable, whereas tuples are immutable. We shall discover what that means in future tasks.
Create versions of days-of-the-week.py and months-of-the-year.py called dotw-tuple.py and moty-tuple.py that use tuples instead of lists. Place the files in the same folder as the list versions.
Tuples are similar to lists but are initialized slightly differently.
There is a big difference however: lists are mutable, whereas tuples are immutable. We shall discover what that means in future tasks.
Create versions of days-of-the-week.py and months-of-the-year.py called dotw-tuple.py and moty-tuple.py that use tuples instead of lists. Place the files in the same folder as the list versions.