Answered step by step
Verified Expert Solution
Question
1 Approved Answer
lists in python i want each element of B_list to be A_list - 5 import random #A list = 20 random number eg (5,15,34,50,....) A=20
lists in python
i want each element of B_list to be A_list - 5
import random
#A list = 20 random number eg (5,15,34,50,....) A=20 A_list=[] for i in range (A): c=random.randrange(0,50,1) A_list.append(c) print(A_list)
#B_list should = A list - 5 #eg : if A_list = (10,20,30) #B_list should be (5, 15, 25) B_list=[] for i in range(A): c=([i]in A_list)-5 B_list.append(c) print(B_list)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started