+ 6
[challenge]Transforming a list
Given a list points = [[1,"a","b"],[2,"d","e"],[3,"e","f"]] transfer to [[1,'a,b'],[2,'b,c'],[3,'c,d']] oneliner welcome
2 Answers
+ 10
Edit:
print([[i[0],','.join(i[1:])] for i in points]) #this makes sense
print([[i[0],','.join([chr(ord('a')+i[0]-1),chr(ord('a')+i[0])])] for i in points]) #but this answers the question
https://code.sololearn.com/cUWnW042xht6/?ref=app
+ 1
wht to do??
not clear...