Question: def elements _ in _ range ( nums , lower _ bound, upper _ bound ) : for num in nums: if lower _ bound

def elements_in_range(nums, lower_bound, upper_bound):
for num in nums:
if lower_bound <= num <= upper_bound:
print(num, end="")
nums = input().split()
nums =[int(num) for num in nums]
lower_bound, upper_bound = map(int, input().split())
result =[str(num) for num in nums if lower_bound <= num <= upper_bound]
print(','.join(result))
how do I get my answer to end with comas? for example
25,0,33,
my answer is ending with
25,0,33
I need my answer to end with a comma rather than a space

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!