How you can do like that sololearn? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 12

How you can do like that sololearn?

First of all you write an incomplete code and even if it was complete then answer is wrong plz check my post. https://www.sololearn.com/post/453418/?ref=app

30th Jun 2020, 7:28 AM
Bharat
Bharat - avatar
8 Answers
+ 5
I had suggested an amendment here😂 https://code.sololearn.com/cwPPHzqFW5R7/?ref=app
1st Jul 2020, 1:59 PM
ProfOduola🙏🇳🇬
ProfOduola🙏🇳🇬 - avatar
+ 12
AJ Anant see here how it's answer can be int https://www.sololearn.com/post/453412/?ref=app
30th Jun 2020, 11:12 AM
Bharat
Bharat - avatar
+ 5
Mansi 👑 𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 Check here on each iteration table1 size is increasing till infinity. That's why you are getting that result. @Mansi problem is in your code not in Sololearn compiler. https://code.sololearn.com/cvxvi8yVBwgx/?ref=app
30th Jun 2020, 7:54 AM
A͢J
A͢J - avatar
+ 3
𝐊𝐢𝐢𝐛𝐨 𝐆𝐡𝐚𝐲𝐚𝐥 Here data is appending in table1 so each time table1 size will increase and loop will iterate till infinity and finally will throw an error.
30th Jun 2020, 7:48 AM
A͢J
A͢J - avatar
+ 2
Mansi 👑 Ok got it. That is wrong quiz approval. You can report to Sololearn.
30th Jun 2020, 6:48 PM
A͢J
A͢J - avatar
+ 1
Mansi 👑 Can you share your code so we can correct it because in your Code for loop is going till infinite because you are appending data in table1 so each time table1 size will increase and you will get this error. You need to append data in another array.
30th Jun 2020, 7:45 AM
A͢J
A͢J - avatar
+ 1
dict1={'a':1,'b':2,'c':3} dict2={'a':4,'b':5,'c':6} table1=[dict1,dict2] for row in table1[:]: # <= iterate over a copy row['a']=str(row['a']) table1.append(row) print(type(table1['b'])) # <= this will not work as the table is a list and indices must be integers or slices
30th Jun 2020, 10:17 AM
rodwynnejones
rodwynnejones - avatar
+ 1
Yeah! Sometimes it do happens with me as well.....but after making some nessecary changes it works
1st Jul 2020, 1:01 PM
Arya Deep Chowdhury
Arya Deep Chowdhury - avatar