+ 1
I have asked for a help, pls help me
The problem is in my code bits https://code.sololearn.com/cN5rVMsRhOv9/?ref=app
11 ответов
+ 3
why dont you create an empty list and append each for loop variable to it.
example
l = []
for element in string:
#put your condition inside for loop if you have one
l.append(element)
print(l)
+ 2
Are those inputs?
+ 1
Abhay No
+ 1
lis=[]
lis.append("abc") ??
And please use tags for language relevant to question , not for asking questions.
+ 1
abc is just the first element, I need a code to make it a list of other elements as well
+ 1
n = int(input('how many string? ')
list = [
input('string #'+str(i)+': ')
for i in range (1,n+1)
]
print(list)
"""
however, in sololearn, you must provide all inputs at once, each separated by a new line:
3
abc
bcd
def
output:
['abc', 'bcd', 'def']
"""
+ 1
Thanks Ankit.. This is what I wanted..
+ 1
https://www.sololearn.com/post/985319/?ref=app
Someone help me please see my post ,I want to make working scope.....
0
Swastik Patro what do you want to do?
0
I have to put those outputs of a loop into a list of strings..
0
Unable to get this, I am a beginner.