Question: Lecture 11: Lists List variables, accessing list elements, swap two list elements 1. Write Python code to create a list variable containing 4 first names.

 Lecture 11: Lists List variables, accessing list elements, swap two list
elements 1. Write Python code to create a list variable containing 4

Lecture 11: Lists List variables, accessing list elements, swap two list elements 1. Write Python code to create a list variable containing 4 first names. The last name must be your own name. 2. Write an assignment statement to change your name to Karl", 3. Write an assignment statement to change the first name to "Dan". 4. Write code to exchange "Dan" (the first name in the list) and "Karl" (the last one) in the list. List membership test What does the following program display? ch = "/" resultA - ch in ("-", "" results - ch not in "-", "/"): print (resulta, results) List traversal List methods: append, Insert, remove, Index, reverse, sort. Built-in functions for lists . List parameters for functions Lists returned from a function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!