Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
how can we write this single statement code into multiple lines?
I can understand only for loop written in multiple lines. Anyone, please break this code into multiple line code.
amp.append([amp[i] for i in ida])
By a for loop:
l = []
for i in ida:
l.append(amp[i])
amp.append(l)
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 days ago.
Improve this question
I want to know how when somebody uses a slash command and puts a id / number it will store that id and if they use it again it will give them the same answer but im using import random.
Can someone just drop a code below or tell me how please?
Didn't try anything yet.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 11 months ago.
Improve this question
Why is it necessary to use and and vice versa in the while loop where or is appropriate in meaning?
'and' is working only when every condition is satisfied
while 'or' is working when even one of conditions is true
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
There are my lists:
i1,i2,i3,i4,i5 = [],[],[],[],[]
and I need the string "test" to be appended to each list. How can I do that?
I thought about using a loop but couldn't manage to do that.
Are there any other ways to append to all the five lists?
easy busy
i1,i2,i3,i4,i5 = 5*[['test']]
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
The questions are being asked but the if statements do not show up. What mistake am I making?
print() is a built-in function, if you want to call the function to print out text in the console, you have to use it like this:
print(arguments)
This
print = (arguments)
is not calling print(), but is assigning something to the name "print".
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I would like to create this for loop, but the text in the loop is quoted.
How can this be done please?
Thank you!
https://prnt.sc/tvutcl
in your image is in quotes, is an f-string, but they forgot to add the f
year = [2016,2017,2018,2019,2020]
for i in year:
rtx_price = (data.loc[f'{year}-07-31', 'RTX'])