Correct the code by removing space between the character and number that is given in output screen | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Correct the code by removing space between the character and number that is given in output screen

https://code.sololearn.com/chZLeIIQvFEa/?ref=app

24th Dec 2020, 7:14 PM
harsh lakhara
harsh lakhara - avatar
5 Answers
+ 1
Oh ok I think you can use `sep` keyword argument to manipulate the separator that is used for separating items by print() function. for line in a: length = len( line ) # line length if line.endswith( "\n" ): # this line ends with line break length -= 1 print( line[0], length, sep = "" ) # sep : item separator => empty string
25th Dec 2020, 11:16 AM
Ipang
+ 1
Did you accidentally delete the code? It's link isn't working ...
25th Dec 2020, 12:47 AM
Ipang
+ 1
Sorry for the wrong link Now the link is working
25th Dec 2020, 10:47 AM
harsh lakhara
harsh lakhara - avatar
+ 1
Ipang thank you
25th Dec 2020, 11:21 AM
harsh lakhara
harsh lakhara - avatar
+ 1
No problem 👌
25th Dec 2020, 11:29 AM
Ipang