0
Correct the code by removing space between the character and number that is given in output screen
5 Antworten
+ 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
+ 1
Did you accidentally delete the code?
It's link isn't working ...
+ 1
Sorry for the wrong link
Now the link is working
+ 1
Ipang thank you
+ 1
No problem 👌