Question: pythoj language Write a single python program to perform the following tasks in order specified using the commands provided and discussed during class: KEEP IT

pythoj language
pythoj language Write a single python program to perform the following tasks

Write a single python program to perform the following tasks in order specified using the commands provided and discussed during class: KEEP IT SIMPLE AND FOLLOW INSTRUCTIONS! 1. Create a list named lista containing integer values 1 2 3 4 5 in that order 2. Create a list named list containing 3 individual character values a b c in that order 3. Use the extend method to concatenate the two strings with lista appended by list 4. Use single print command to print the new lista 5. Use a single print command with proper index value to print the 'a' from the new lista 6. Use the insert method to insert the string "XYZ" between the 5 and the 'a' in lista 7. Use the append method to put a 5 at the end of lista 8. Use a single print command with appropriate slice to display the slice of list that begins with 4 and ends with 'b' (inclusive) 9. Use the count method in an if statement to display the index value for the first occurrence of 5 in lista if at least one occurrence exists, otherwise display an error message indicating "Not found" 10. Use a for loop to print each item in lista individually poate ricer

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!