List operations | Sololearn: Learn to code for FREE!


List operations

str <- readLines('stdin') x <- list("name"="James", "age"=42, "country"="canada","id"=5067) #your code goes here x[["id"]] <- str print(x) It fails what is wrong with this code?


12/2/2021 3:54:55 AM

Kim Hammar-Milliner

7 Answers

New Answer


I'm asking for problems statement, without knowing that how anyone can help you As I don't see any syntax error in this code (acc. To me)


Is it from code coach?


Question ?


I found it on the internet


What is your question?


The given code declares a list with some data and takes a string as input. You need to add the taken string to the list as a new field called "id", and output the resulting list.


It is now solved