Question: SOS!!! Help please use python code to do it, Thank you. Question1: Given a list Lst, write a for statement that prints out every element.
SOS!!! Help please use python code to do it, Thank you.
Question1:
Given a list Lst, write a for statement that prints out every element.
Q2:
The following statement creates a list. What will be the values in Lst?
Lst = [j for j in range (10) if j % 2 == 0]
Q3:
Given two lists L1 = [bye, hi, good, okay, sad], L2 = [5, 3, 9, 2, 7], write one line of code to create a list in the form of [(bye, 5), (hi, 3), (good, 9), (okay, 2), (sad, 7)]
Q4:
Given two lists L1 = [bye, hi, good, okay, sad], L2 = [5, 3, 9, 2, 7], write one line of code to create a dictionary in the form of {bye : 5, hi : 3, good : 9, okay : 2, sad : 7}, here the order of dictionary elements doesnt matter.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
