using python 3: actress = ( (“Julia”, “Roberts”), (8, “October”, 1967), [ (“Duplicity”, 2009), (“Not

using python 3: actress = ( (“Julia”, “Roberts”), (8, “October”, 1967),

[ (“Duplicity”, 2009),

(“Notting Hill”, 1999),

(“Pretty Woman”, 1990),

(“Erin Brockovich”, 2000),

(“Eat Pray Love”, 2010),

(“Mona Lisa Smile”, 2003) ],

(“Atlanta”, “Georgia”) ) print(type(actress[1]))

print(actress[1])

for movies in actress: this is line 12

print(actress[2:]) On new line (the body of the loop), display only the title ofthe movie. Run. On line 12, append the movie (“Oceans Twelve”, 2004) to thelist. Run and notice that, even though the tuple is immutable, wecan change its list which is mutable. . . .

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *