Answer the question
In order to leave comments, you need to log in
How to operate on the value received by a function in Python?
Good evening.
Such a question - the result of the function is a list:
def vhod(s):
a = input().split() #тут строка переводится в число
for i in range(len(a)):
a[i] = int(a[i])
s = []
for i in range(a[0], a[-1]+1, 1):
s.append(i)
print(s) #выводятся все числа от первого эл-та списка до последнего
Answer the question
In order to leave comments, you need to log in
How to substitute an array into a function?
maybe you should read the answers to your own questions?
def vhod():
a = input().split() #тут строка переводится в список строк
a = list(map(int, a)) # тут список строк превращается в список чисел
print(a) #выводятся все числа от первого эл-та списка до последнего
return a
map(lambda l: l*2, my_list)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question